/ Python And R Data science skills: 04/20/18

Friday 20 April 2018

18 Qplot in R Language Telugu

-------------------------------

#install.packages("ggplot2")
library(ggplot2)
?qplot
wbvlr<-read.csv("gd.csv")
head(wbvlr)
qplot(data=wbvlr,x=Internet.users)
qplot(data=wbvlr,x=Income.Group)
qplot(data=wbvlr,x=Income.Group,
      y=Birth.rate)
qplot(data=wbvlr,x=Income.Group,
      y=Birth.rate,size=115)
qplot(data=wbvlr,x=Income.Group,
      y=Birth.rate,size=I(.5))
qplot(data=wbvlr,x=Income.Group,
      y=Birth.rate,size=I(5),
      color=I("Blue"))
qplot(data=wbvlr,x=Income.Group,y=Birth.rate,size=I(.9),
      color="Y",geom = "boxplot")

head(wbvlr)
qplot(data=wbvlr,x=Internet.users,
      y=Birth.rate)
qplot(data=wbvlr,x=Internet.users,
      y=Birth.rate,color=I("red"),
      size=4)
qplot(data=wbvlr,x=Internet.users,
      y=Birth.rate,color=Income.Group,
      size=I(4))



17 filters in Data Frame R Language Telugu

---------------------------------------------
wbvlr<-read.csv("gd.csv")
wbvlr
nrow(wbvlr)
ncol(wbvlr)
head(wbvlr)
tail(wbvlr)
head(wbvlr,n=10)
tail(wbvlr,n=1)
?str()
#Interview
str(wbvlr)
summary(wbvlr)
###
head(wbvlr)
wbvlr[1,3]
wbvlr[,3]
wbvlr[2,]
wbvlr[c(1,2,9),]
wbvlr[2,"Income.Group"]
wbvlr[,3]
wbvlr$
  wbvlr$Income.Group
wbvlr$Country.Name
wbvlr$Country.Name[3]
wbvlr$Income.Group

levels(wbvlr$Income.Group)
levels(wbvlr$Country.Name)
levels(wbvlr$Internet.users)
head(wbvlr)
# ------------
wbvlr[1:10,]
wbvlr[1:10,]
wbvlr[c(1,4),]
wbvlr[1,]
is.data.frame(wbvlr[1,])
wbvlr[,1]
is.data.frame(wbvlr[,1])
wbvlr[,1,drop=F]
#--
wbvlr$Birth.rate * wbvlr$Internet.users
wbvlr$Birth.rate*wbvlr$Internet.users
#extra column
head(wbvlr)
wbvlr$bi
wbvlr$a<- wbvlr$Birth.rate * wbvlr$Internet.users
wbvlr$bi<-  wbvlr$Birth.rate * wbvlr$Internet.users
wbvlr$bi<-NULL
wbvlr$a
wbvlr
wbvlr$b<-c(1:3)
head(wbvlr)
wbvlr$d<-c(1:4)
wbvlr$ramesh<-c(1:4)
wbvlr
#remove cou
wbvlr$ramesh<-NULL
# filter ing data
head(wbvlr)
wbvlr$b<-NULL
wbvlr$c<-NULL
wbvlr$Internet.users<2
wbvlr$Internet.users<2

les2<-wbvlr$Internet.users<2
wbvlr[les2,]
wbvlr[wbvlr$Birth.rate>40,]
str(wbvlr[wbvlr$Birth.rate>40,])
wbvlr[wbvlr$Birth.rate>40 & les2,]
wbvlr[wbvlr$Income.Group == "Low income",]

wbvlr[wbvlr$Income.Group == "Low income",]

16 Data Frames functions and $ symbol in R language

-------------------------------------------------
wbvlr<-read.csv("gd.csv")
wbvlr
nrow(wbvlr)
ncol(wbvlr)
head(wbvlr)
tail(wbvlr)
head(wbvlr,n=10)
tail(wbvlr,n=1)
?str()
#Interview
str(wbvlr)
summary(wbvlr)
###
head(wbvlr)
wbvlr[1,3]
wbvlr[,3]
wbvlr[2,]
wbvlr[c(1,2,9),]
wbvlr[2,"Income.Group"]
wbvlr[,3]
wbvlr$
wbvlr$Income.Group
wbvlr$Country.Name
wbvlr$Country.Name[3]
wbvlr$Income.Group

levels(wbvlr$Income.Group)
levels(wbvlr$Country.Name)
levels(wbvlr$Internet.users)
head(wbvlr)

15 Data Frames in R language

------------------------------------------------
#read file Manu
#a<-read.csv(file.choose())
#a
#read.csv(file.choose())
Demodata<-read.csv(file.choose())
Demodata
#red file pwd
getwd()
setwd("E:\\vlr training\\data frames")
setwd("C:\\Users\\venkat\\Desktop\\R langugae telugu")
getwd()
demodata1<-read.csv("gd.csv")
demodata1

r language videos