Hi, When I install R it gives an warning:I have a problem combining R and SPSS (21). I do not know whether the solution is in R or in spss, so I will post both in the R group and in the SPSS group. I use the R plugin in spss(21). The most important reason to use this plugin is ggplot2.This plugin requires R 14.0 (14.2 or 15 does not work). Warning message: package ‘ggplot2’ was built under R version 2.14.2 > ggplot()+geom_bar(aes(x=factor(1),y=10)) Error in initFields(scales = scales) : could not find function "initRefFields" |
R2.14.2 with Statistics 21 should work
fine. In most cases, in my experience, you can ignore warning messages
about versions anyway.
Jon Peck (no "h") aka Kim Senior Software Engineer, IBM [hidden email] phone: 720-342-5621 From: Frans Marcelissen <[hidden email]> To: [hidden email], Date: 04/02/2013 02:47 AM Subject: [SPSSX-L] R plugin, ggplot2: could not find function "initRefFields" Sent by: "SPSSX(r) Discussion" <[hidden email]> Hi, I have a problem combining R and SPSS (21). I do not know whether the solution is in R or in spss, so I will post both in the R group and in the SPSS group. I use the R plugin in spss(21). The most important reason to use this plugin is ggplot2.This plugin requires R 14.0 (14.2 or 15 does not work). When I install R it gives an warning: > library(ggplot2) Warning message: package ‘ggplot2’ was built under R version 2.14.2 After that, when i use gplot2: > ggplot()+geom_bar(aes(x=factor(1),y=10)) Error in initFields(scales = scales) : could not find function "initRefFields" I found on internet that the solution for this problem is upgrading to a newer version of R (and indeed, on 2.15 or 3.0 ggplot2 works fine). spss needs 2.14.0, however. Does anyone know a solution? Thanks |
In reply to this post by Frans Marcelissen-4
Hi Frans,
Did you try using stat="identity"? options(warn=-1) require("ggplot2") || install.packages("ggplot2") ggplot() + geom_bar(aes(x=factor(10),y=2), stat="identity") # or perhaps a nicer example: dta <- data.frame(x=runif(100, 2, 10), y=runif(100, 4, 10)) ggplot() + geom_bar(aes(x=factor(dta$x),y=dta$y), stat="identity") > R.Version()$version.string; R.Version()$os [1] "R version 2.14.1 (2011-12-22)" [1] "linux-gnu" Regards, Albert-Jan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a fresh water system, and public health, what have the Romans ever done for us? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
Banned User
|
I will be out of the office until Wednesday, April 3, 2013, 2013, with no access to email. However, please know that your message is very important
to me and I will respond when I return. If this is an emergency, please call our office at 734.459.1030.
Thank you.
Sincerely,
Cheryl _____________________________________________________
Cheryl A. Boglarsky, Ph.D. Human Synergistics, Inc.
39819 Plymouth Road
Plymouth, MI 48170
734.459.1030
This message includes legally privileged and confidential information that is intended only for the use of the recipient named above. All readers
of this message, other than the intended recipient, are hereby notified that any dissemination, modification, distribution or reproduction of this e-mail is strictly forbidden.
|
Free forum by Nabble | Edit this page |