Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Could not find function "ggplot" error
Post Body

I created a plot using Esquisse last night and got the following output code:

housing %>%

filter(Qrtr >= 1L & Qrtr <= 1L) %>%

ggplot()

aes(x = Year, y = Home.Value, fill = State, colour = State)

geom_point(shape = "circle", size = 1.5)

scale_fill_hue(direction = 1)

scale_color_hue(direction = 1)

labs(

x = "Year",

y = "Home Value",

title = "Home Values Over Time"

)

theme_minimal()

I was able to insert this code into an R scrip and run it successfully. Today, I'm trying to add to the code and I get this error message:

install.packages("ggplot2") Installing package into ‘C:/Users/AlyHusser/AppData/Local/R/win-library/4.3’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.3/ggplot2\_3.4.4.zip' Content type 'application/zip' length 4299762 bytes (4.1 MB) downloaded 4.1 MB package ‘ggplot2’ successfully unpacked and MD5 sums checked The downloaded binary packages are in C:\Users\AlyHusser\AppData\Local\Temp\RtmpuuftNL\downloaded_packages > ggplot(df, aes(x=x, y=y)) geom_point() Error in ggplot(df, aes(x = x, y = y)) : could not find function "ggplot"

My Global Environment list is also now blank. I have tried uninstalling the package, re-installing it, etc. and got this message:

install.packages("ggplot2") Installing package into ‘C:/Users/AlyHusser/AppData/Local/R/win-library/4.3’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.3/ggplot2\_3.4.4.zip' Content type 'application/zip' length 4299762 bytes (4.1 MB) downloaded 4.1 MB package ‘ggplot2’ successfully unpacked and MD5 sums checked

package ‘timechange’ successfully unpacked and MD5 sums checked package ‘broom’ successfully unpacked and MD5 sums checked package ‘labelled’ successfully unpacked and MD5 sums checked package ‘nortest’ successfully unpacked and MD5 sums checked package ‘xts’ successfully unpacked and MD5 sums checked package ‘polynom’ successfully unpacked and MD5 sums checked package ‘lubridate’ successfully unpacked and MD5 sums checked package ‘broom.helpers’ successfully unpacked and MD5 sums checked package ‘patchwork’ successfully unpacked and MD5 sums checked package ‘tidyr’ successfully unpacked and MD5 sums checked package ‘EnvStats’ successfully unpacked and MD5 sums checked package ‘ggpp’ successfully unpacked and MD5 sums checked package ‘ggstats’ successfully unpacked and MD5 sums checked package ‘ggplot2’ successfully unpacked and MD5 sums checked package ‘ggplot2.utils’ successfully unpacked and MD5 sums checked The downloaded binary packages are in C:\Users\MyName\AppData\Local\Temp\RtmpuuftNL\downloaded_packages

I have absolutely no idea what happened or why I can't fix it. Unfortunately my teacher's response to my question is "google it" which is incredibly unhelpful as I can't get any of the google suggestions to work. I feel like I'm losing my mind.

Author
Account Strength
50%
Account Age
1 year
Verified Email
Yes
Verified Flair
No
Total Karma
1,199
Link Karma
158
Comment Karma
1,041
Profile updated: 10 hours ago
Posts updated: 2 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
10 months ago