[R-sig-Geo] (no subject)

MacQueen, Don macqueen1 at llnl.gov
Fri Jun 19 00:08:09 CEST 2015


This is a question for R-help, not R-sig-Geo.
Please also provide a subject, and do not send html.

-Don

-- 
Don MacQueen

Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062





On 12/9/14, 7:17 AM, "R-sig-Geo on behalf of rpaolo1967 RP"
<r-sig-geo-bounces at r-project.org on behalf of rpaolo1967 at gmail.com> wrote:

>Hi everybody,
>
>
>
>I apologize for this simple question. I¹m running a code which, at each
>step of a loop, generates a data frame similar to this one:
>
>
>
>d <- rep(1:10, each = 6, len = 60)
>
>a <- rep(0:5, each = 1, len = 60)
>
>v <- rep(sort(runif(5, 30, 50), decreasing = T), each = 1, len = 60)
>
>x <- data.frame(t(cbind(d,a,v)))
>
>
>
>I want to create and save plots of the results, once data frames are
>created. I¹m using this code within the loop, after the creation of the
>data frame:
>
>
>
># library(lattice)
>
>svg("eraseMe.svg") # Format doesn¹t matter, and name is iteratively
>created
>
>xyplot(v ~ a | d, x, aspect = 5, type = "o", xlab = "a", ylab = "v")
>
>update(trellis.last.object(),
>
>    strip = strip.custom(strip.names = FALSE, strip.levels = i),
>
>    par.strip.text = list(cex = 1.1))
>
>dev.off()
>
>
>
>where ³i² is something as simple as
>
>
>
>i <- as.numeric(c(1:10))
>
>
>
>It works troublelessly on my laptop (under 32 bits Windows Vista), but I
>get the following message when running in computers under ubuntu or 64
>bits
>Windows 7:
>
>
>
>Error in !lattice.getStatus("current.plot.saved", prefix = prefix) :
>
>  invalid argument type
>
>
>
>Notwithstanding, when I simply copy and paste again the following code,
>after getting the message, it works fine (but loop is interrupted).
>
>
>
>svg("eraseMe.svg") # No matter the format
>
>xyplot(v ~ a | d, x, aspect = 5, type = "o", xlab = "a", ylab = "v")
>
>update(trellis.last.object(),
>
>   strip = strip.custom(strip.names = FALSE, strip.levels = i),
>
>   par.strip.text = list(cex = 1.1))
>
>dev.off()
>
>
>
>Any suggestion? Thanks a lot!!!!
>
>
>Paolo
>
>	[[alternative HTML version deleted]]
>
>_______________________________________________
>R-sig-Geo mailing list
>R-sig-Geo at r-project.org
>https://stat.ethz.ch/mailman/listinfo/r-sig-geo



More information about the R-sig-Geo mailing list