Re: [R] stepAIC formula upper limit guidelines

2005-10-25 Thread Uwe Ligges
Tate Avery wrote: Hello, I am attempting to refine an lm()-generated model using the stepAIC function. My model has approximately 20 inputs and I am trying to determine the best upper limit scope for using those inputs. My lower limit is y ~ 1 and my original upper limit was y ~ x1 +

Re: [R] Basic: setting resolution and size of an R graphic

2005-10-25 Thread Dr. med. Peter Robinson
Thanks Marc and Jim for the tips. The PDF file that I create with R looks about the same as the one you created. However, I need to get the graphic to be a certain size (300 pixels wide). I have been using the ImageMagick program to do so for other graphics: convert test.pdf -resize 300x300

Re: [R] Spearman's Rho Help!

2005-10-25 Thread Joost van Evert
On Mon, 2005-10-24 at 09:01 -0400, Suresh Kumar Karanam wrote: Hi, I have a dataset with four categories of data, the number of samples are not the same in each category. I want to find the Spearaman's Rho. Let me give an example.

Re: [R] GAM and AIC: How can I do??? please

2005-10-25 Thread Simon Wood
Please send R and mgcv version numbers, as I can't replicate this problem. best, Simon Hello, I'm a Korean researcher who have been started to learn the R package. I want to make gam model and AIC value of the model to compare several models. I did the GAM model, but

[R] Compilationerror at installation of packages

2005-10-25 Thread Poizot Emmanuel
Dear all, I did post a message about problems on installing a package (gstat) which ends with a compilation error: ** libs gcc -I/usr/lib/R/include -mieee-with-inexact -fPIC -g -O2 -c block.c -o block.o gcc -I/usr/lib/R/include -mieee-with-inexact -fPIC -g -O2 -c chfactor.c -o

[R] Can anyone please tell me how to strip the white spaces from a character vector?

2005-10-25 Thread roger bos
for example: a$tic[1:10] [1] AIR ABCB ABXA ACMR ADCT ADEX [7] ABM AFCE AG ATG Can anyone please tell me how to strip the white spaces from a$tic? Thanks, Roger [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch

Re: [R] Basic: setting resolution and size of an R graphic

2005-10-25 Thread Marc Schwartz
If you specifically need the plot to have a dimension measured in pixels, then you need to use a bitmapped format such as png and specify the output to be the size you require: png(test.png, width = 300, height = 300, ...) DoYourPlotHere() dev.off() Do this directly using the png() device,

Re: [R] Can anyone please tell me how to strip the white spaces from a character vector?

2005-10-25 Thread Sean Davis
On 10/25/05 8:51 AM, roger bos [EMAIL PROTECTED] wrote: for example: a$tic[1:10] [1] AIR ABCB ABXA ACMR ADCT ADEX [7] ABM AFCE AG ATG Can anyone please tell me how to strip the white spaces from a$tic? Thanks, Roger [[alternative HTML version deleted]]

Re: [R] Can anyone please tell me how to strip the white spaces from a character vector?

2005-10-25 Thread cgb
Quoting roger bos [EMAIL PROTECTED]: for example: a$tic[1:10] [1] AIR ABCB ABXA ACMR ADCT ADEX [7] ABM AFCE AG ATG Can anyone please tell me how to strip the white spaces from a$tic? Thanks, Roger [[alternative HTML version deleted]]

Re: [R] Can anyone please tell me how to strip the white spaces from a character vector?

2005-10-25 Thread Marc Schwartz
On Tue, 2005-10-25 at 08:51 -0400, roger bos wrote: for example: a$tic[1:10] [1] AIR ABCB ABXA ACMR ADCT ADEX [7] ABM AFCE AG ATG Can anyone please tell me how to strip the white spaces from a$tic? Thanks, Roger Roger, See the next to last set of examples in ?sub. a -

Re: [R] Can anyone please tell me how to strip the white spaces from a character vector?

2005-10-25 Thread Romain Francois
Le 25.10.2005 14:51, roger bos a écrit : for example: a$tic[1:10] [1] AIR ABCB ABXA ACMR ADCT ADEX [7] ABM AFCE AG ATG Can anyone please tell me how to strip the white spaces from a$tic? Thanks, Roger gsub(' ','',a$tic) -- visit the R Graph Gallery :

Re: [R] Can anyone please tell me how to strip the white spaces from a character vector?

2005-10-25 Thread roger bos
Thanks to everyone for the gsub function. The white spaces were generated by reading in the file, but its a fixed width file and I only need some of the columns, so this was the easiest way to do it. Thanks, Roger On 10/25/05, Marc Schwartz [EMAIL PROTECTED] wrote: On Tue, 2005-10-25 at

Re: [R] Can anyone please tell me how to strip the white spaces from a character vector?

2005-10-25 Thread Wuming Gong
Try trim() in gdata package. Wuming On 10/25/05, roger bos [EMAIL PROTECTED] wrote: for example: a$tic[1:10] [1] AIR ABCB ABXA ACMR ADCT ADEX [7] ABM AFCE AG ATG Can anyone please tell me how to strip the white spaces from a$tic? Thanks, Roger [[alternative HTML

Re: [R] Can anyone please tell me how to strip the white spaces from acharacter vector?

2005-10-25 Thread Dimitris Rizopoulos
one way is to use strsplit(), i.e., xx - c(AIR , ABCB , ABXA , ACMR , ADCT , ADEX ) unlist(strsplit(xx, )) Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel:

Re: [R] Can anyone please tell me how to strip the white spaces from a character vector?

2005-10-25 Thread Uwe Ligges
roger bos wrote: for example: a$tic[1:10] [1] AIR ABCB ABXA ACMR ADCT ADEX [7] ABM AFCE AG ATG Can anyone please tell me how to strip the white spaces from a$tic? Not beeing an expert for regular expressions, I'd try sub( *$, , sub(^ *, , a$tic)) to strip from beginnings

[R] how to increase the font size of axis data

2005-10-25 Thread Yogesh K. Tiwari
Hello R Users, I am a new user to R. When we make a simple plot then how to increase the font size of the data at the each axis. Many thanks, Kind regards, Yogesh -- === Yogesh Tiwari, Max-Planck Institute for Biogeochemistry, Hans-Knoell Strasse 10,

[R] how we can save the data computed in R

2005-10-25 Thread Yogesh K. Tiwari
Hello R Users, How we can save any data which is computed in side R . For example I am fitting a fourth harmonic function on any time series data. We can plot this function on each other with timeseres data in R but suppose I want to save this fitted function values as one column then how to do

Re: [R] Basic: setting resolution and size of an R graphic

2005-10-25 Thread Romain Francois
Le 25.10.2005 14:59, Marc Schwartz a écrit : If you specifically need the plot to have a dimension measured in pixels, then you need to use a bitmapped format such as png and specify the output to be the size you require: png(test.png, width = 300, height = 300, ...) DoYourPlotHere()

[R] file size limit for importing SAS file

2005-10-25 Thread Guenther, Cameron
Does anyone know if there is a file size limit for inputting a SAS data set? The file size I am trying to import is 184 MB. The code is: library(foreign) sashome-C:/Program Files/SAS Institute/SAS/V8 input.data-read.ssd( file.path(G:/DATA/Cam/ECPATH/FIM),tbm_c, +

Re: [R] Can anyone please tell me how to strip the white spaces f rom a character vector?

2005-10-25 Thread Warnes, Gregory R
If you are interested in trimming leading and trailing whitespace (and not interior whitespace), you can use the 'trim' function from the 'gdata' package. -G -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of roger bos Sent: Tuesday, October 25, 2005

[R] query on xtable output

2005-10-25 Thread ManuelPerera-Chang
Dear all, I am exporting to latex a matrix via xtable. My matrix includes e.g. 4 rows and 4 columns. The first two rows containing real values(e.g. a laboratory parameter's mean value), and the two rows at the bottom containing only integers (number of cases).

Re: [R] how to increase the font size of axis data

2005-10-25 Thread ManuelPerera-Chang
Hi Yogesh, try modifying the graphical parameters like par(cex=2,cex.axis=1.2) for graphs in base: or for e.g. trellis graphs in the lattice package the trellis parameter´s (try ?trellis.par.get) axis.text - trellis.par.get(axis.text) axis.text$cex - 3.2 trellis.par.set(axis.text,

Re: [R] Can anyone please tell me how to strip the white spaces from acharacter vector?

2005-10-25 Thread Stefano Calza
What about xx - c(AIR , ABCB , ABXA , ACMR , ADCT , ADEX , AAA) xx=gsub([[:blank:]],,xx) Stefano On Tue, Oct 25, 2005 at 03:14:39PM +0200, Dimitris Rizopoulos wrote: Dimitrisone way is to use strsplit(), i.e., Dimitris Dimitrisxx - c(AIR , ABCB , ABXA , ACMR , ADCT , ADEX ) Dimitris

[R] Inf in regressions

2005-10-25 Thread Dimitri Szerman
Hi, Suppose I I wish to run lm( y ~ x + z + log(w) ) where w assumes non-negative values. A problem arises when w=0, as log(0) = -Inf, and R doesn't accept that (as it accepts NA). Is there a way to tell R to do with -Inf the same it does with NA, i.e, to ignore it? ( Otherwise I have to do

Re: [R] panel data unit root tests

2005-10-25 Thread jukka ruohonen
Thanks, that will certainly do the trick. I came across systemfit and sem - packages that are useful in this respect as well. Jukka Ruohonen University of Helsinki Have you received a reply? I haven't seen one. RSiteSearch(panel data unit root test) produced another question on this but no

Re: [R] Inf in regressions

2005-10-25 Thread Dimitris Rizopoulos
you could use: lm( y ~ x + z + log(w), subset = w 0) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/(0)16/336899 Fax: +32/(0)16/337015

[R] running AMOVA from spreadsheet genotype data

2005-10-25 Thread Patrick Kuss
Hi, I plan to run amova in R from randomly generated subsets of my original dataset. The structure of my data looks as below: region - rep(c(east,west),each=8) pop - c(rep(1:4,each=4)) ind - c(rep(1:4,4)) l.1 - c(1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0) l.2 - sample(c(0,1),16,replace=T) l.3 -

Re: [R] Inf in regressions

2005-10-25 Thread Prof Brian Ripley
Actually, R does not accept NA. First, the action is from lm and not from the R base, and second, NAs are in fact deleted and not accepted. Function lm() has a na.action argument which is by default na.omit. You could easily make na_and_inf.omit and use it. You could also use subset=(w 0).

[R] running AMOVA from spreadsheet genotype data

2005-10-25 Thread Patrick Kuss
- Weitergeleitete Nachricht von Patrick Kuss [EMAIL PROTECTED] - Datum: Tue, 25 Oct 2005 17:28:33 +0200 Von: Patrick Kuss [EMAIL PROTECTED] Antwort an: Patrick Kuss [EMAIL PROTECTED] Betreff: running AMOVA from spreadsheet genotype data An: [EMAIL PROTECTED] Hi, I plan

Re: [R] file size limit for importing SAS file

2005-10-25 Thread Peter Dalgaard
Guenther, Cameron [EMAIL PROTECTED] writes: Does anyone know if there is a file size limit for inputting a SAS data set? The file size I am trying to import is 184 MB. The code is: library(foreign) sashome-C:/Program Files/SAS Institute/SAS/V8 input.data-read.ssd(

Re: [R] lme and lmer syntax

2005-10-25 Thread Ronaldo Reis-Jr.
Em Seg 24 Out 2005 18:08, Doran, Harold escreveu: Ronaldo See the article on lmer pasted below for syntax. It is the only current source documenting the code. In lmer(), the nesting structure for the ranmdom effects is handled in a slightly different way. If your observations are nested as

[R] Ryan's Q Post-Hoc for ANOVA

2005-10-25 Thread Jarrett Byrnes
I'm using lm to run an ANOVA, and would like to use Ryan's Q as my post-hoc (as recommended by Day and Quinn, 1989, Ecological Monographs). I can't seem to find any methods in the base stats package that implement this post-hoc. Is there a good package of post-hoc methods out there, or has

Re: [R] lme and lmer syntax

2005-10-25 Thread Doran, Harold
There is an issue with implicit nesting in lmer. In your lme() model you nest block/irrigation/density/fertilizer. In lmer you need to do something like (I dind't include all of your variables, but I think the makes the point)

[R] survival frailty models

2005-10-25 Thread lamack lamack
Dear all, someone could send me a introductory reference about Survival Frailty Models??? Thank you very much _ Chegou o que faltava: MSN Acesso Grátis. Instale Já! __

[R] Graphics window always overlaps console window!

2005-10-25 Thread mtb954
Does anyone know how I can set up R so that when I make a graphic, the graphics window remains behind the console window? It's annoying to have to reach for the mouse every time I want to type another line of code (e.g., to add another line to the plot). Thanks.

Re: [R] Graphics window always overlaps console window!

2005-10-25 Thread Marc Schwartz (via MN)
On Tue, 2005-10-25 at 11:55 -0600, [EMAIL PROTECTED] wrote: Does anyone know how I can set up R so that when I make a graphic, the graphics window remains behind the console window? It's annoying to have to reach for the mouse every time I want to type another line of code (e.g., to add

[R] panel data unit root tests

2005-10-25 Thread jukka ruohonen
Thanks, that will certainly do the trick. I came across systemfit and sem - packages that are useful in this respect as well. Jukka Ruohonen University of Helsinki Have you received a reply? I haven't seen one. RSiteSearch(panel data unit root test) produced another question on this but no

Re: [R] Graphics window always overlaps console window!

2005-10-25 Thread Andy Bunn
Does anyone know how I can set up R so that when I make a graphic, the graphics window remains behind the console window? It's annoying to have to reach for the mouse every time I want to type another line of code (e.g., to add another line to the plot). Thanks. What OS? In Windows with R GUI

Re: [R] Graphics window always overlaps console window!

2005-10-25 Thread Marc Schwartz (via MN)
On Tue, 2005-10-25 at 13:07 -0500, Marc Schwartz (via MN) wrote: On Tue, 2005-10-25 at 11:55 -0600, [EMAIL PROTECTED] wrote: Does anyone know how I can set up R so that when I make a graphic, the graphics window remains behind the console window? It's annoying to have to reach for the mouse

Re: [R] Graphics window always overlaps console window!

2005-10-25 Thread P Ehlers
[EMAIL PROTECTED] wrote: Does anyone know how I can set up R so that when I make a graphic, the graphics window remains behind the console window? It's annoying to have to reach for the mouse every time I want to type another line of code (e.g., to add another line to the plot). Thanks. I

Re: [R] Graphics window always overlaps console window!

2005-10-25 Thread mtb954
Thanks for your replies, I was unaware of these solutions. On 10/25/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Does anyone know how I can set up R so that when I make a graphic, the graphics window remains behind the console window? It's annoying to have to reach for the mouse every time I

[R] data.frame-question

2005-10-25 Thread Michael Graber
Dear R-List, I am very new to R and programming itself, so my question may be easy to answer for you. I tried a lot and read through the manuals, but I still have the following problem: I have 2 data-frames: Number-as.numeric (Number) Name-as.character (Name) TAB1-data.frame (Name,Number) - it

[R] making an inicator variable

2005-10-25 Thread Jennifer Dillon
Hello, I am almost a total novice, and I am sure there must be an easy (and basic) way to turn a variable of 1's and 2's into a variable of zeros and ones. This is in a data frame, but if I could do it with vectors, that's all I need. Can someone tell me how? Thanks so much, Jen

Re: [R] lme and lmer syntax

2005-10-25 Thread Ronaldo Reis-Jr.
Em Ter 25 Out 2005 15:24, Doran, Harold escreveu: There is an issue with implicit nesting in lmer. In your lme() model you nest block/irrigation/density/fertilizer. In lmer you need to do something like (I dind't include all of your variables, but I think the makes the point)

Re: [R] data.frame-question

2005-10-25 Thread bogdan romocea
Welcome to R. See ?merge then ?aggregate or require(Hmisc) ?summarize or ?by You can probably find many examples in the archives, if needed. -Original Message- From: Michael Graber [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 25, 2005 3:45 PM To: R-Mailingliste

Re: [R] Can anyone please tell me how to strip the white spaces from acharacter

2005-10-25 Thread Francisco J. Zagmutt
I addition to all the many good options presented you can also use trimWhiteSpace{limma} which is just a higher level call to sub() x=scan(clipboard, what=character) Read 6 items x [1] AIR ABCB ABXA ACMR ADCT ADEX trimWhiteSpace(x) [1] AIR ABCB ABXA ACMR ADCT ADEX Cheers Francisco

Re: [R] making an inicator variable

2005-10-25 Thread Vincent Goulet
Le 25 Octobre 2005 15:51, Jennifer Dillon a écrit : Hello, I am almost a total novice, and I am sure there must be an easy (and basic) way to turn a variable of 1's and 2's into a variable of zeros and ones. This is in a data frame, but if I could do it with vectors, that's all I need.

[R] One more about Error in step() (or stepAIC) for Cox model

2005-10-25 Thread Li, Jia
Thank you for Prof.Ripley's suggestion. I fixed the program by adding a lower scope, and the program ran, but I still got warning messages, and don't know what is going on, would this affect my results? ... Step: AIC= 12337.74 Surv(tlfup, cen) ~ MI[[j]]$trt + MI[[j]]$agem40 + MI[[j]]$agem40sq +

[R] Building Rmysql Source in Windows XP: DLLTOOL can't find DEF file

2005-10-25 Thread mark.lopresti
Hello everyone, I have a question regarding building the Rmysql packages from source in Windows. I am currently using: Windows XP, R-2.2.0, Mysql 3.23 I have installed all of the tools from Installation and Administration and after following all the instructions to the letter, I compiled

Re: [R] making an inicator variable

2005-10-25 Thread Wensui Liu
x-c(1, 2); y-ifelse(x==1, 1, 0); On 10/25/05, Jennifer Dillon [EMAIL PROTECTED] wrote: Hello, I am almost a total novice, and I am sure there must be an easy (and basic) way to turn a variable of 1's and 2's into a variable of zeros and ones. This is in a data frame, but if I could do it

[R] Confidence Intervals for Mixed Effects

2005-10-25 Thread Michel Friesenhahn
I'm fairly new to R and am wondering if anybody knows of R code to calculate confidence intervals for parameters (fixed effects and variance components) from mixed effects models based on Sattherthwaite's method? I'm also interested in Satterthwaite-based confidence intervals for linear

[R] solving ODE's in matrix form with lsoda()

2005-10-25 Thread Jorge Ahumada
Hello there, Suppose you want to solve the following system of ODE's (a simple Lotka-Volterra predator prey model) dP/dt = beta*P*V - mu*P dV/dt = r*V - beta*P*V where P and V are the numbers of predators and prey. Now, this is easy to do, but suppose you have a system of equations like

Re: [R] Building Rmysql Source in Windows XP: DLLTOOL can't find DEF file

2005-10-25 Thread Prof Brian Ripley
On Tue, 25 Oct 2005 [EMAIL PROTECTED] wrote: Hello everyone, I have a question regarding building the Rmysql packages from source in Windows. Pretty esoteric, and the posting guide suggests you ask the maintainer. I am currently using: Windows XP, R-2.2.0, Mysql 3.23 MySQL 3.23 is

Re: [R] making an inicator variable

2005-10-25 Thread John Fox
Dear Jen, There are lots of different ways to do what you want -- you've already had two suggestions -- but you might consider whether you really need to do it. In particular, R will generate its own indicator variables (and other kinds of contrasts) in linear and other statistical models (see

[R] Writing point pattern to a file

2005-10-25 Thread Ajit Chakrapani Warrier
Hi, I am trying to use the R package 'spatstat' for generating spatial poisson point process graphs. I can create a point pattern using the following commands: pp - rpoispp(.01, win=owin(c(0,100),c(0,100))) and also view the resulting graph by: plot(pp)

Re: [R] Finding the neighbors of the point

2005-10-25 Thread Leaf Sun
Hi Roger and the list, The package is working very well. What surprised me most is the speed. As I mentioned in my previous emails, I have to find the neighbors for around 200,000 individuals. It took no more than 10 minutes for the function to finish the searching and returned enough

[R] a silly question on index of a matrix

2005-10-25 Thread zhihua li
Hi netters, This is probably a silly question,but I can't find the answer after searching the R-help archives online. ok, I have a matrix. I know there is a 10 somewhere in it. Now I want to know the index of the element 10 in this matrix. That is, if X[i,j]=10, I want to know i and j. Is

Re: [R] a silly question on index of a matrix

2005-10-25 Thread Simon Blomberg
?which X - matrix(2:10, nrow=3) which(X == 10, arr.ind=TRUE) row col [1,] 3 3 HTH, simon. At 11:52 AM 26/10/2005, you wrote: Hi netters, This is probably a silly question,but I can't find the answer after searching the R-help archives online. ok, I have a matrix. I know there

[R] Stat. Computing 2006 Chambers Award competition

2005-10-25 Thread jose . pinheiro
The Statistical Computing Section of the American Statistical Association announces the competition for the John M. Chambers Statistical Software Award. In 1998 the Association for Computing Machinery presented its Software System Award to John Chambers for the design and development of S. Dr.

[R] (no subject)

2005-10-25 Thread Bill Hunsicker
R-Help, I am trying to do simple plots of the characteristics of cellular phones. I am values that fit along an axis that has many data points around 800 and 1800. I am not interested in the dead space' between the two clusters of data. I am not interested in a linear axis. I would

[R] R- exp(-1000) ? - how to get R to give me an actual answer ?

2005-10-25 Thread rramacha
Dear All, I am a novice user of the R software package. When I try and compute, exp(-1000) or exp(-2000), i get the answer as zero. Is there any way i can get R to compute the answer and give me an actual number ? ( by increasing the precision or any other method). If I cannot get R to give

Re: [R] R- exp(-1000) ? - how to get R to give me an actual answer ?

2005-10-25 Thread Gabor Grothendieck
Since log base 10 is log(x)/log(10) the exponent is: floor(log(exp(-1000))/log(10)) = floor(-1000/log(10)) which in an R session gives: floor(-1000/log(10)) [1] -435 and the mantissa is: exp(-1000)/10^(-435) = exp(-1000)/exp(-435*log(10))

Re: [R] (no subject)

2005-10-25 Thread Gabor Grothendieck
Check out axis.break in the plotrix package. On 10/26/05, Bill Hunsicker [EMAIL PROTECTED] wrote: R-Help, I am trying to do simple plots of the characteristics of cellular phones. I am values that fit along an axis that has many data points around 800 and 1800. I am not interested in the