본문 바로가기
반응형

분류 전체보기123

(R) geom_col() VS geom_bar() This posting is about the difference between geom_col() and geom_bar() which look similar. geom_col() geom_bar() need both x-axis and y-axis designated only need x-axis or y-axis designated need summary about x and y only need raw material > library(ggplot2)> library(dplyr)> mpg2%group_by(manufacturer)%>%summarise(mean_hwy=mean(hwy)) # make summarise > ggplot(data=mpg2,aes(x=manufacturer,y=mean_.. 2020. 7. 20.
Interpret data frame/ summary(), typeof(), str(), class(),View(),names(),ncol(),length(),nrow(),dim() Interpreting the data frame > final_score student math science1 Jane 70 902 Dora 90 303 Beth 50 804 Park 100 100 > typeof(final_score) [1] "list" #list consists of 3 components which have 4 elements. #data frame is a kind of lists > class(final_score)[1] "data.frame" summary(), str() ----------------------identify data frame's structure > summary(final_score) student math science Length:4 Min. :.. 2020. 7. 16.
(R) data.frame function / Way to make data frame 데이터 프레임 만들기 R Way to make a data frame data fame is mostly used data structure which consists of columns(Variables) and rows(Cases)1st way to make a data frame > student class height height_of_students height_of_students student class height1 Jane 1 1532 Dora 3 1723 Beth 2 165 4 Park 2 180 'height_of_students' become the data frame which consists of 3 variables ('students,' 'class,' 'height') and 4 cases. 2nd.. 2020. 7. 16.
Covariance & Correlation Coefficient /Property of Covariance Variance measures the spread of random variable around its mean. Covariance measures the direction of linear relationship between two random variables. That is, it is a measure of the scattered relation between two random variables. Cov(X,Y) = E(X-E(X)) E(Y-E(Y)) Covariance is usually computed with E(XY)-E(X)E(Y) rather than Cov(X,Y) = E(X-E(X)) E(Y-E(Y)) According to the meaning of Covariance b.. 2020. 7. 15.
반응형