Data Visualization (png file)

I am able to create a .png file of my data visualizations. However, the file comes up blank when I open it.
This is the code that I used : png(file = 'Calories vs Weight.png', width=500, height=500)

Doesn’t say what file to save under that name.

How do I do that? Do I save it in the plots section?

png(YOUR_IMAGE_NAME,file = 'Calories vs Weight.png', width=5000, height=5000)

I ran this code and I got an error that says 'could not find function ggplot'
merge_5 <- merge(weightLogInfo_merged_cleaned, dailyCalories_merged_cleaned, by=c('Id'))
merge_6 <- merge_5[,-9]
ggplot(data=merge_6, aes(x=WeightPounds, y=Calories)) +
geom_point(stat='identity', color='green')+
geom_smooth(mapping=aes(x=WeightPounds, y=Calories))
png(Calories_vs_Weight,file = 'Calories vs Weight.png', width=500, height=500)

That is asking for


This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.