Dear Colleagues, We are attempting to create trees using R with our Ruby on Rails application. However, we are running into a problem involving the creation of the graphic. We would like them to be in either jpg or png format so that users can save, but due to a lack of control over our sever we are unable to start X11 server. Is there a way to create these images without using X11 server? Thanks, JIllian -- 917-434-7511 http://www.jilliankozyra.com
Use the GDD library ________________________________________ From: r-help-bounces at r-project.org [r-help-bounces at r-project.org] On Behalf Of Jillian E Kozyra [jillyh0 at gmail.com] Sent: 13 March 2010 16:26 To: r-help at r-project.org Subject: [R] (no subject) Dear Colleagues, We are attempting to create trees using R with our Ruby on Rails application. However, we are running into a problem involving the creation of the graphic. We would like them to be in either jpg or png format so that users can save, but due to a lack of control over our sever we are unable to start X11 server. Is there a way to create these images without using X11 server? Thanks, JIllian -- 917-434-7511 http://www.jilliankozyra.com ______________________________________________ R-help at r-project.org mailing list 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.
I am trying to plot a smoothing spline to using the following code, and an error pops up:> car <- read.table("car.csv",sep=",",header=T) > attach(car) > names(car)[1] "veh_value" "exposure" "clm" "numclaims" "claimcst0" "veh_body" [7] "veh_age" "gender" "area" "agecat" "X_OBSTAT_"> plot( log(veh_value), claimcst0, ylim=c(0,10000)) > smooth.spline( log(veh_value), claimcst0)Error in smooth.spline(log(veh_value), claimcst0) : NA/NaN/Inf in foreign function call (arg 3) ### What does this error mean> I do not get it?? [[alternative HTML version deleted]]
Hi, On Tue, Apr 13, 2010 at 11:35 AM, Danai Katsande <daniekatsande at gmail.com> wrote:> I am trying to plot a smoothing spline to using the following code, and an > error pops up: > >> car <- read.table("car.csv",sep=",",header=T) >> attach(car) >> names(car) > ?[1] "veh_value" "exposure" ?"clm" ? ? ? "numclaims" "claimcst0" "veh_body" > ?[7] "veh_age" ? "gender" ? ?"area" ? ? ?"agecat" ? ?"X_OBSTAT_" > >> plot( log(veh_value), claimcst0, ylim=c(0,10000)) >> smooth.spline( log(veh_value), claimcst0) > Error in smooth.spline(log(veh_value), claimcst0) : > ?NA/NaN/Inf in foreign function call (arg 3) > ### What does this error mean> I do not get it??It means that you have some data in your `veh_value` vector that `log` / `smooth.spline` is choking on. For instance, are there negative numbers in `veh_value`? R> log(-2) [1] NaN Check the other possibilities, like the existence of NA, or Inf values (use `is.na` and `is.infinte`) Examine both `veh_value` and also the result of log(veh_value). HTH, -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact