similar to: defmacro and bwplot incompatibilities?

Displaying 20 results from an estimated 2000 matches similar to: "defmacro and bwplot incompatibilities?"

2006 Aug 16
1
bwplot in loop doesn't produce any output
Hi, running the following code by itself runs as expected. ---------------------------------------------------------------------------- k <- 1 i <- 2 j <- 3 NumName <- varnames[num.cols[k]] FacNames <- varnames[fac.cols[c(i,j)]] tmp <- paste(FacNames[1],NumName,sep="~") fml <- formula(paste(tmp,FacNames[2],sep="|")) bwplot(fml, data
2012 Jan 12
2
defmacro installation issue
Hi everybody, I want to use macro in my R code. But defmacro was not in my libraries. So I installed it : > install.packages("gtools") Installing package(s) into ?C:/Program Files/R/R-2.13.2/library? (as ?lib? is unspecified) essai de l'URL 'http://cran.cict.fr/bin/windows/contrib/2.13/gtools_2.6.2.zip' Content type 'application/zip' length 102500 bytes (100 Kb)
2011 Apr 27
1
bwlpot problems: printing, and tick labels
Two problems with the code below. A. It produces empty JPEGs. When the 'bwplot' line alone is submitted, the plot duly shows up. B. When the 'bwplot' line alone is submitted, y labels are values 1 to 6, not actual distinct values of y$maxthreads. (C. I would, of course, prefer to produce plots for all distinct values of x$maxthreads in a single swoop, on a single figure). Can
2008 Dec 05
1
Problems with lattice-histograms or png within loops
Dear R-users, I have a question concerning the use of lattice plots within for-loops. I want to create a png file containing a lattice histogram which works out fine (part 1). When I loop the whole code, the graphic file does not contain anything (part 2). I can fix it by wrapping the histogram function into a print command (part 3). Why is that so? Why can I not loop it directly? TIA, Mark
2004 Dec 10
1
lattice graphics empty in Sweave
Hello, I have problems using lattice graphics together with Sweave under Windows XP and R 2.0.0; 2.0.1 Patched; 2.1.0 devel respectively. Base graphics are o.k., but for lattice graphics empty files (.eps and .pdf) are generated. The only workaround I found was to write and read the respective figures explicitely using postscript() and includegraphics{}. Have I missed something to solve this
2010 Feb 17
2
Problems with xyplot
Hello I wonder whether someone can tell me what I am doing wrong. Here is the code (from Bayesian Computation with R - Chapter 2.3.R) that I am trying to run #################################### # Section 2.3 Using a Discrete Prior #################################### graphics.off() # Close all graphics rm(list=ls()) # Clear all variables library(LearnBayes)
2012 Jan 19
3
Not generating line chart
Hi All, Can you please help me, why this code in not generating line chart? library(ggplot2) par(mfrow=c(1,3)) #qplot(TIME1, BASCHGA, data=Orange1, geom= c("point", "line"), colour= ACTTRT) unique(Orange1$REFID) -> refid for (i in refid) { Orange2 <- Orange1[i == Orange1$REFID, ] pdf('PGA.pdf') qplot(TIME1, BASCHGA, data=Orange2, geom= c("line"),
2010 Apr 04
2
One question about saving graph by using xyplot
Hey, folk. I am trying to get many figures by using the function "xyplot" in the library "lattice". I tried to using the loop to finish it quickly. But I cannot open the saved file after I run the program. But if I use the function "plot" to get other simply figures, it can work. So I want to ask how I can get the saved figures by using "xyplot". The
2012 Aug 31
1
loading 'RcmdrPlugin.FactoMineR' pachage in R
Hi everybody I have a question about loading 'RcmdrPlugin.FactoMineR' pachage in R. I have installed Rcmdr, FactoMineR and 'RcmdrPlugin.FactoMineR. when I want to load this package, at first a message inform me I should load the following list of packages: FactoMineR, ellipse, lattice, cluster, scatterplot3d, Rcmdr, tcltk, car, MASS, nnet I have loaded all above packages and again I
2004 Jun 09
1
Using macros
Dear list members, I've been puzzling over how best to clean up the code for my Rcmdr package. In particular, there's a lot of repetitive tcltk code in the package, and as Martin M?chler has pointed out to me, this makes the package difficult to maintain. If R were Lisp, I'd use macros for much of the clean up. My efforts to do similar things with R functions has run into problems
2008 Dec 31
2
Lattice trellis.focus() with pdf
Hi, I have a the code for a plot that works perfectly running in R and printing to a Quartz object but which doesn't work when I make the trellis device a pdf. The code is as follows: ---- trellis.device(device="pdf", new=TRUE) trellis.par.set(my.theme()) dotplot(Y ~ X | C, groups=G, data=D, layout=c(2,1), ... ) trellis.focus("panel", 1, 1) for (y in 1:5) {
2006 May 02
1
Call trellis function in a function (PR#8827)
Full_Name: Fan Version: 2.2.1 OS: Windows Submission from: (NULL) (159.50.101.9) Hello, When I call trellis function (such as histogram, densityplot, etc.) in a function, the call seems being ignored (no graphics is drawing) if some other instructions are placed afeter that call. Here's an example: y = rnorm(100*3) b = sample(1:3,300,replace=T) f = function() { densityplot(~y|b) }
2006 Oct 23
1
Color eps/ps output from specialized plots?
Hello, First a disclaimer :) I am very new to using R. I am generating some plots and eventhough I can get colored output in the encapsulated postscript files in the simplest of commands (e.g. plot(1:10,1:10, type="l", col="red") ), it does not work for the particular plots I want. It works on the screen. Here is an example taken out from "Mixed-Effects Models in S and
2007 Feb 14
1
lattice graphics and source()
Hi, I am trying the lattice graphics in R. Let's say, such a little experiment in file myprog.r: f <- function(){ x <- 1:10 y <- x^2 xyplot(y ~ x) } f() Then I run the program: > source("myprog.r") but nothing happens. Manully run f() at the command line: > f() then the figure is shown. This seems to be a bug only associated with lattice graphics, the
2007 Apr 24
2
xyplot source file only work with echo=TRUE
Hi, I write several xyplot graphics on a source file. When I try to use source("graphics.R") the source don't work, but if I use source("graphics.R",echo=T) it work. Generally some commands work without echo=T, but xyplot dont work. Why it dont work without echo=T? It is possible to write a source that dont need echo=T on source command? Thanks Ronaldo -- Aluno de
2007 Oct 09
2
bug: wireframe and tcltk
Dear R users, When i call the wireframe function from within a tcltk widget, it does not work. Here is a sample program that shows the bug. When you try: is.it.a.bug() You can see that the "curve" instruction is run but not the "wireframe" one. Do you have an explanation about this point? Best regards, Pierre Lafaye de Micheaux -- Pierre Lafaye de Micheaux Bureau
2009 Feb 05
1
Problem with plotting data from within a function
Dear List, I try to develop code where plotting functions are embeded in my own functions. The following is simplified example: > test <- function() { > data <- data.frame(x=rep(1:2, each=50), y=rnorm(100)) > library(lattice) > attach(data) > xyplot(y~x) > detach() >} >test() As far as I understand R, when test is called this should create one local
2009 Sep 18
1
Lattice barplot not wokring in for-loop?
Dear List-Members, I am plotting a barplot with the lattice package. The code works, but when I execute the same code in a for-loop no plot is shown. Can't figure what the problem is. (Maybe I am missing something here, but I tried it with plot device pdf, calling windows() or X11(), testing on windows and linux, etc.) INFO: R version 2.9.1 (2009-06-26) using Windows/RGui require(lattice)
2009 Nov 25
1
lattice: plotting in a loop
Hi, I'm having trouble seeing graphics output from lattice xyplot() when called from inside a for loop: x <- 1:50 for ( i in 1:5 ) { y <- rnorm(x) xyplot(y~x) # no graphics when inside for-loop # plot(x,y) # works fine # Sys.sleep(0.5) # doesn't seem to help } The xyplot() is fine outside the loop. Results are the same to X11 device and to file
2009 Dec 16
2
problem with a densityplot
Hi, i have a script how i launch lattice to make a densityplot. in the script: jpeg(file="XXX.jpg") densityplot(~f_diametro+m_diametro+n_diametro, plot.points="rug", auto.key=T) dev.off() does'nt work and in R i dont have any output but if i launch by R row by row, runs correctly..... any idea?