Re: [R] Problems with points in plots when importing from pdf to an SVG editor

2010-11-04 Thread Rafael Björk
> > > > >ZapfDingbats >Dingbats > > > > I've found that in my case, this happens when viewing a PDF > with that plotting character under old versions of Evince, but > not newer. > > --Erik > > Rafael Björk wrote

[R] Problems with points in plots when importing from pdf to an SVG editor

2010-11-04 Thread Rafael Björk
Dear R-users When trying to import graphics from an pdf-file to a Vector graphics editor (I use Inkscape, but i've confirmed the same problem on adobe products), all points in the graphics turn out as "q"s. This example displays the beaviour: pdf(file="points are weird.pdf") plot(1:5) dev.off()

Re: [R] Pesky homemade function code

2010-09-16 Thread Rafael Björk
Checking on the function 'combinations' in gplot i find this: if (mode(n) != "numeric" || length(n) != 1 || n < 1 || (n%%1) != 0) stop("bad value of n") So essentially, the argument 'length(data$times[data$ids == id[1]])' in the line 'combinations(length(data$times[data$ids == id[

Re: [R] how to cluster vectors of factors

2010-09-06 Thread Rafael Björk
If I understand you correctly and each factor consists of binary data, you may want to check out monothethic analysis, available in the package 'cluster'. For a simple example and short description of the method to get you started, just type in: require(cluster) ?mona As far as i know there's no

Re: [R] Error: cannot allocate vector of size 198.4 Mb

2010-08-31 Thread Rafael Björk
2010/8/31 나여나 > >Hi, All > > I have a problem of R memory space. > > I am getting "Error: cannot allocate vector of size 198.4 Mb" > > > You may want to check circle 2 of the R inferno (found here: http://www.burns-stat.com/pages/Tutor/R_inferno.pdf). [[alternative HTML ver

Re: [R] Logistic regression with multiple imputation

2010-06-30 Thread Rafael Björk
In addition to the tips above, you may want to chek out: http://www.stat.columbia.edu/~gelman/arm/missing.pdf 2010/6/30 Chuck Cleland > On 6/30/2010 1:14 AM, Daniel Chen wrote: > > Hi, > > > > I am a long time SPSS user but new to R, so please bear with me if my > > questions seem to be too basi

Re: [R] Sampling with replacement

2010-06-16 Thread Rafael Björk
If you for some reason want to be shown all the possible combinations, try expand.grid(1:20,1:20,1:20,1:20) (ugly code). Don't use this for sampling. hth Rafael 2010/6/16 Jorge Ivan Velez > Try > > sample(20, 4, replace = TRUE) > > HTH, > Jorge > > > On Wed, Jun 16, 2010 at 10:20 AM, Somnath So

Re: [R] problem with if else statement

2010-06-08 Thread Rafael Björk
Hi Peter! The 'if' function operate on a single logical expression, while you provided a vector. What your code does at present is subtract 5 from all values in rr.dia.2m if the first value in med.hyper is 1 and otherwise simply returns all values as is. Since you have no reproducible data, it's h

Re: [R] strsplit

2010-06-01 Thread Rafael Björk
This might not be the most elegant way of doing it, but it should probably work, given that data is always separated by a "_". string.1<-strsplit(c("GenusA_SpeciesC_Tree","GenusA_SpeciesF_Tree", "GenusB_SpeciesA_Shrub"),"_") matrix(unlist(string.1),ncol=3,byrow=TRUE) 2010/6/1 Joël Baumann > He