Hi everyone , this is my first post about R programming language. I would like to share some basic functions and syntax in order to be be familiar with R.
- colnames – Returns the list of names from dataset
2. head – Returns the first 6 rows of vector matrix , table , dataframe
3. str(tablename) – returns the dataframe , array horizontally
4. summarize(tablename,assigned_columnname=aggregation(columnname))- Summarize the data for example mean , median
5. rename ; rename(tablename,assignedcolumnname1=oldcolumnname1,assignedcolumnname2=oldcolumnname2,………)
6. ggplot2 ; this is one of the popular function for getting started with data visualization
-ggplot(data=tablename,aes(x=columnname1,y=columnname2))+geom_point() – Creates the simple ggplot
-ggplot( data=tablename,aes(x=columnname1,y=columnname 2,color=columnname3))+geom_point() – Creates the ggplot with columnname3 category
-ggplot( data=tablename,aes(x=columnname1,y=columnname 2,color=columnname3))+geom_point()+facet_wrap(columnx) – Creates the ggplot with columnname3 category and creates diffirent visualization with columnx category