How to import data to create a bar chart in R studio?
How to import data to create a bar chart in R studio?
To read bar chart data csv file in R, first you need to download the file onto your computer.
Then to read the actual file in R we use the read.csv function. As an argument we give the file to be read, in other words 'bar_chart_data.csv' file, like so:
df_used_cars <- read.csv("bar_chart_data.csv")
If your file is not in the default R folder, you need to add a file location. Say you saved csv file in C:\Downloads, then you need to specify the path as:
df_used_cars <- read.csv("C:/Downloads/bar_chart_data.csv")
Make sure you use '/' between the folder names.
Error: object 'bar_chart' not found
hello ma'am, in video 5 section 3 (Bar chart - R)you use an ggplot object as bar_chart. As same I used this object in my shell I get an error(without type mistake). Could you please resolve this error.
Thank you.
Error: object 'bar_chart' not found
hello ma'am, in video 5 section 3 (Bar chart - R)you use an ggplot object as bar_chart. As same I used this object in my shell I get an error(without type mistake). Could you please resolve this error.
Thank you.