{"id":34071,"date":"2022-02-25T10:06:00","date_gmt":"2022-02-25T09:06:00","guid":{"rendered":"http:\/\/54.194.80.134.nip.io\/blog\/napredna-analitika-s-r-pregled\/"},"modified":"2022-06-06T23:07:11","modified_gmt":"2022-06-06T21:07:11","slug":"napredna-analitika-s-r-pregled","status":"publish","type":"post","link":"https:\/\/www.cubeserv.com\/hr\/napredna-analitika-s-r-pregled\/","title":{"rendered":"Napredna analiza s R: Pregled"},"content":{"rendered":"\t\t
\n\t\t\t\t\n\t\t\t\t\tinstall.packages(\"tidyverse\")\r\nlibrary(datasets)\r\ndata(\"iris\")<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t1. Stup\u010dasti dijagrami<\/h3>\r\nStup\u010dasti dijagrami su naj\u010de\u0161\u0107a vrsta grafova koji se koriste u analizi. Koriste se kad god \u017eelite usporediti vrijednosti razli\u010ditih kategorija pomo\u0107u okomitih traka koje predstavljaju vrijednosti. Ove \u0161ipke razli\u010dite visine \u010dine usporedbu vrlo prikladnom. Evo primjera koji prikazuje duljinu lapova razli\u010ditih vrsta.<\/span>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\tggplot(data=iris, aes(x=Species, fill = Species)) + \r\ngeom_bar() + \r\n xlab(\"Species\") + \r\n ylab(\"Count\") + \r\n ggtitle(\"Bar plot of Sepal Length\")<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t2. Histogrami<\/h3>\r\nHistogrami su vrlo sli\u010dni stup\u010dastim dijagramima. Koriste se za grafi\u010dki prikaz kontinuiranih podataka i grupiranje u spremnike. Svaka traka u histogramu ima vi\u0161e spremnika s razli\u010ditim bojama \u0161to olak\u0161ava uvid u frekvenciju svake pojedina\u010dne kategorije. Evo kako ih mo\u017eemo napraviti pomo\u0107u ggplot2.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t