[R] ggplot2: 'not finding <-<- error'
Chris Evans
chr|@ho|d @end|ng |rom p@yctc@org
Fri Nov 12 20:32:35 CET 2021
I think it's your xlab. Should be:
### creating reproducible example
library(tidyverse)
rnorm(50) %>%
as_tibble() %>%
rename(cfs = value) -> pdx_disc
ggplot(data = pdx_disc, aes(x = NULL, y = cfs)) +
geom_boxplot(
# custom boxes
color='#00008B',
fill='#00008B',
alpha=0.2,
# custom outliers
outlier.color='#B22222',
outlier.fill='#FF3030',
outlier.size=2) +
coord_flip() +
### I think this is what you want for your xlab:
xlab('Portland Discharge')
----- Original Message -----
> From: "Rich Shepard" <rshepard using appl-ecosys.com>
> To: r-help using r-project.org
> Sent: Friday, 12 November, 2021 19:23:18
> Subject: [R] ggplot2: 'not finding <-<- error'
> I'm writing a script to plot data distributions. It worked in a basic form
> and I'm now adding features and tweaking the presentation. When I sourced
> the file this error appeared:
>
> Error in p1 <- ggplot(data = pdx_disc, aes(x = NULL, y = cfs)) +
> geom_boxplot(color = "#00008B", (from all_disc_boxplot.r#9) :
> could not find function "<-<-"
>
> Line 9 in the script defines the first boxplot:
> p1 <- ggplot(data = pdx_disc, aes(x = NULL, y = cfs)) +
> geom_boxplot(
> # custom boxes
> color='#00008B',
> fill='#00008B',
> alpha=0.2,
> # custom outliers
> outlier.color='#B22222',
> outlier.fill='#FF3030',
> outlier.size=2) +
> coord_flip() +
> xlab = 'Portland Discharge'
>
> I don't see any <-<- (nor have I before now) and I need help understanding
> the source of this error.
>
> TIA,
>
> Rich
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
--
Chris Evans (he/him) <chris using psyctc.org> Visiting Professor, UDLA, Quito, Ecuador
Work web site: https://www.psyctc.org/psyctc/
CORE site: https://www.coresystemtrust.org.uk/
Personal site: https://www.psyctc.org/pelerinage2016/
OMbook: https://ombook.psyctc.org/book/
More information about the R-help
mailing list