library(ggplot2)
library(haven)
data = read_sas('C:\\Users\\kk\\Documents\\adpc1.sas7bdat')
adpcc = ggplot(data, aes(x=visit, y=pcstresn)) + geom_point()
adpcc
Error in eval(expr, envir, enclos) : object 'visit' not found
The error seems clear to me. There is no column named 'visit' in data. Use
names(data)
and
str(data)
to see what's in there, and remember that R (unlike SAS) is case sensitive.
Best,
Ista
--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2
---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
The error seems clear to me. There is no column named 'visit' in data. Use
names(data)
and
str(data)
to see what's in there, and remember that R (unlike SAS) is case sensitive.
Best,
Ista
On May 7, 2016 8:19 AM, "SRINI" <somka...@gmail.com> wrote:
I am importing SAS dataset to R and using as source data to draw a graph in ggplot2. It produces only values with list not graph. Error is given below. can you please help me troubleshooting?. Thanks.library(ggplot2)
library(haven)
data = read_sas('C:\\Users\\kk\\Documents\\adpc1.sas7bdat')
adpcc = ggplot(data, aes(x=visit, y=pcstresn)) + geom_point()
adpcc
Error in eval(expr, envir, enclos) : object 'visit' not found
--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+unsubscribe@googlegroups.com
More options: http://groups.google.com/group/ggplot2
---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+unsubscribe@googlegroups.com.