Re: [R] Wikis etc.

2006-01-06 Thread Fernando Henrique Ferraz P. da Rosa
y (which includes many people not directly interested in coding or development issues). -- "Though this be randomness, yet there is structure in't." Rosa, F.H.F.P Instituto de Matemática e Estatística Universidade de São Paulo Fernando

Re: [R] Splitting the list

2006-01-05 Thread Fernando Henrique Ferraz P. da Rosa
edu.au/~rking/R/devel/05/07/1623.html -- "Though this be randomness, yet there is structure in't." Rosa, F.H.F.P Instituto de Matemática e Estatística Universidade de São Paulo Fernando Henrique Ferraz P. d

Re: [R] Wikis for R

2006-01-05 Thread Fernando Henrique Ferraz P. da Rosa
cture in't." Rosa, F.H.F.P Instituto de Matemática e Estatística Universidade de São Paulo Fernando Henrique Ferraz P. da Rosa http://www.feferraz.net __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] A comment about R:

2006-01-05 Thread Fernando Henrique Ferraz P. da Rosa
= 459437845; do obs = 1 to 25; x = rannor(seed); output; end; run; -- "Though this be randomness, yet there is structure in't." Rosa, F.H.F.P Instituto de Matemática e Estatística Universidade de São Paulo Fernando Henrique Ferra

Re: [R] load object

2005-01-14 Thread Fernando Henrique Ferraz P. da Rosa
rune <- 1:10 save(r0.prune,file='dados.dat') rm(r0.prune) t <- get(load('dados.dat')) t -- Fernando Henrique Ferraz P. da Rosa http://www.ime.usp.br/~feferraz __ R-help@stat.math.ethz.ch mailing

Re: [R] Paths for Shell Scripts called from R

2004-12-11 Thread Fernando Henrique Ferraz P. da Rosa
ine here: $ touch /tmp/bla1.tex /tmp/bla2.tex $ R > system('pdflatexall.sh /tmp') pdflatex /tmp/bla1.tex pdflatex /tmp/bla2.tex -- Fernando Henrique Ferraz P. da Rosa http://www.ime.usp.br/~feferraz __ [EMAIL PROTECTED] mailing list

Re: [R] lattice graphics empty in Sweave

2004-12-10 Thread Fernando Henrique Ferraz P. da Rosa
a=iris) > @ > > \end{document} > = > This is addressed in Sweave's and R's FAQ. http://www.ci.tuwien.ac.at/~leisch/Sweave/FAQ.html#x1-8000A.6 http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-do-lattice_002ftrelli

Re: [R] Mixed effects model help

2004-12-09 Thread Fernando Henrique Ferraz P. da Rosa
ng. > > Thanks, > Chris > > __ > [EMAIL PROTECTED] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > > -- Fernando Henr

Re: [R] Two factor ANOVA in lme

2004-11-24 Thread Fernando Henrique Ferraz P. da Rosa
on methods (in lme itself you may use maximum likelihood other restricted m.l) and the results need not to be the same. -- Fernando Henrique Ferraz P. da Rosa http://www.ime.usp.br/~feferraz __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] SAS or R software

2004-11-20 Thread Fernando Henrique Ferraz P. da Rosa
e power and flexiblity at hands. * SAS User's Guide: Basics. * Strictly speaking you don't have to learn any of those. You can get along well using plain R in the beginning, but in order to exploit the power of it's approach, you'll find yourself in need to use one or more of

Re: [R] Difference between two correlation matrices

2004-11-19 Thread Fernando Henrique Ferraz P. da Rosa
elp > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > > -- Fernando Henrique Ferraz P. da Rosa http://www.ime.usp.br/~feferraz varcomp <- function(covmat,n) { if (is.list(covmat)) { if (length(covmat) < 2) stop("covmat must be

Re: [R] Difference between two correlation matrices

2004-11-19 Thread Fernando Henrique Ferraz P. da Rosa
variate Analysis, Wiley. + note that a correlation matrix is a special type of a covariance matrix, so you can use a test of hypothesis designed for covariance matrices. -- Fernando Henrique Ferraz P. da Rosa http://www.ime.usp.br/~feferraz __ [EMAIL PROTEC

Re: [R] Exporting to file: passing source name to file name in loop

2004-11-14 Thread Fernando Henrique Ferraz P. da Rosa
(f1 = c(5.56358661715647, 6.10364037003176, > 6.24040147126807, .10.png You should try something like: png(file=paste(substitute(x),".",i,".png",sep=""),width=240,height=240) Also, drop the 'plot.new()', it's useless. png() already

Re: [R] SAS to R migration questions

2004-09-12 Thread Fernando Henrique Ferraz P. da Rosa
Fernando Henrique Ferraz P. da Rosa writes: > cust <- c(111,111,112) > cc <- data.frame(t(sapply(unique(cust),function(level,vec) { > c(custid=level,freq=sum(vec==level)) },cust))) > cc[order(cc$freq,decreasing=T),] An even simpler solution: cc <-

Re: [R] SAS to R migration questions

2004-09-12 Thread Fernando Henrique Ferraz P. da Rosa
nt to do this sort of manipulation directly in SQL. Anyways, the following lines of code in R will do what you described: cust <- c(111,111,112) cc <- data.frame(t(sapply(unique(cust),function(level,vec) { c(custid=level,freq=sum(vec==level)) },cust))) cc[order(cc$freq,decreasing=T),] Chee

[R] Contrast matrices for nested factors

2004-09-06 Thread Fernando Henrique Ferraz P. da Rosa
1 0-1 0 0 0 0 11 1 -1 -1 0 0 1 0 0 0 12 1 -1 -1 0 0 1 0 0 0 13 1 -1 -1 0 0-1 0 0 0 14 1 -1 -1 0 0-1 0 0 0 (notice that in the second matrix all collumns sum to 0, in the f

[R] DBI Interface broken

2003-10-10 Thread Fernando Henrique Ferraz
ned for arguments: drv Anyone has a clue on what might be going on? Is it DBI working for any of you using R 1.8.0? Thank you, -- []'s Fernando Henrique Ferraz P. da Rosa __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

[R] Sweave \Sexpr() issue

2003-09-24 Thread Fernando Henrique Ferraz
Hi, I'm having a little issue with \Sexpr{bla} relating to the number of digits it is using to print its output. I understand that what \Sexpr{bla} does is parsing 'bla' inside R and then returns it coerced into a character string. The problem I'm having is that I'm losing control over the n

[R] Subseting by more than one factor...

2003-06-19 Thread Fernando Henrique Ferraz Pereira da Rosa
Is it possible in R to subset a dataframe by more than one factor, all at once? For instance, I have the dataframe: >data p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 pred 10 1 0 0 0 0 0 0 0 0 0.5862069 40 0 0 0 0 0 0 0 0 1 0.5862069 50 0 0 0 0 0 1 0

[R] Paste and namespace

2003-06-16 Thread Fernando Henrique Ferraz Pereira da Rosa
Hi, my doubt is very simple. I'm sure I've seen someone using something like this before, but unfortunatelly my searches in the archives were useless. Well, I have some objects called after a name that has a number attached to it, varying. Let's say I have: > ls poly1 poly2 poly3 poly4 poly5

[R] Simulating a variable following an arbitrary distribution

2003-06-02 Thread Fernando Henrique Ferraz Pereira da Rosa
Hi, I'd like to know if there's anything in R that could help me do that. Let's suppose I have a density function of a random variable, for example f(x) = (x^3)/4 0 < x < 2 and I would like to simulate it. For the common distributions (exponencial, gamma, cauchy) there are the r-functions (rga

[R] Goodness of fit tests

2003-03-29 Thread Fernando Henrique Ferraz
I have a dataset which I want to model using a Poisson distribution, with a given parameter. I would like to know what is the proper way to do a 'goodness of fit' test using R. I know the steps I'd take if I were to do it 'manually': grouping the numbers into classes, calculating the ex

[R] VIM Syntax Highlighting

2003-03-09 Thread Fernando Henrique Ferraz Pereira da Rosa
Has anyone got vim to have syntax highlighting with R function codes? I know there's something similar that works with emacs (ESS or something like that), but I was wondering if anyone knew an equivalent that worked with vim. Thank you, -- []'s [EMAIL PROTECTED] Bitte lächeln! Fotogaleri

[R] Weird options(digits=n) behaviour

2003-01-29 Thread Fernando Henrique Ferraz Pereira da Rosa
I noticed some very weird behaviour of the function: options(digits=n), where n is the number of digits you would expect to get in R calculations. Let's take a example: > options(digits=4) > getdata(caso.pool.k3.r3.e2) [1] 6.053 2.641 -3.639 14.259 6.082 Which works fine... now,

[R] Plotting coloured histograms...

2003-01-25 Thread Fernando Henrique Ferraz Pereira da Rosa
Hi, I am having some trouble trying to plot a histogram in more than one colour. What I want to do is, plot two vectors in the same histogram, but with different colours, for instance: > x <- rnorm(1000,20,4); > y <- rnorm(1000,10,2); Then I'd like to have x and y ploted on the