R Markdown

This markdown file contains data visualization using plots.

Scatterplot for one categorical vs continuous variable

data=mtcars
plot(data$gear,data$carb)

Scatter plot for one categorical variable

plot(data$gear)

Plot for one continuous variable

plot(data$carb)

Line lot for continuous variable

plot(data$carb,type="l")

Abline-The best fitting line for plot between two continuous variables

plot(data$wt~data$qsec,data=data)
abline(lm(data$wt~data$qsec,data=data))

Line plot for categorical variable

plot(data$gear,type="l")

Line plo for continuous variable

plot(data$carb,type="l")

Barplot

barplot(data$mpg)

Boxplot

boxplot(data$mpg)

Piechart representing distribution of no of gears

gear=table(data$gear)
pie(gear)

Histogram representing frequencies of gears

hist(gear,col="blue")