[R] Interactions in 'MatchBalance' of the package 'Matching'

2009-11-23 Thread anna0102
Hello together, In the package 'Matching' there ist a possibility to determine balance statistics after Matching with the function 'MatchBalance'. In this function there has a formula 'formul' to be given. I'm wondering how I can implement all two-way interactions, without specifying them

Re: [R] Removing + and ? signs

2009-11-23 Thread Peter Dalgaard
Jorge Ivan Velez wrote: And if you want to replace both + and ?, here is a suggestion: x - asdf+,jkl? gsub([?]|[+], , x) # [1] asdf,jkl Once you're into character classes ([]), you might as well go all the way: gsub([?+], , x) [1] asdf,jkl -- O__ Peter Dalgaard

Re: [R] dynlm predict with newdata?

2009-11-23 Thread Achim Zeileis
On Sun, 22 Nov 2009, zubin wrote: Hello, can one use predict, as you can with other model objects like lm, with dynlm to predict a new data set that is identical in field names, just a different time period. Be nice if you could, I don't really want to create a new data set with all the lags,

[R] FUN argument to return a vector in aggregate function

2009-11-23 Thread utkarshsinghal
Hi All, I am currently doing the following to compute summary statistics of aggregated data: a = aggregate(warpbreaks$breaks, warpbreaks[,-1], mean) b = aggregate(warpbreaks$breaks, warpbreaks[,-1], sum) c = aggregate(warpbreaks$breaks, warpbreaks[,-1], length) ans = cbind(a, b[,3], c[,3])

[R] Downloading clim.pact package

2009-11-23 Thread ZABLONE OWITI
Hi all, I am relatively a new user of R. I need assistance on how to download and install the clim.pact_2.2-39.zip. I am running R on Windows. -- ZABLONE OWITI GRADUATE STUDENT Nanjing University of Information, Science and Technology College of International Education

[R] non-intuitive behaviour after type conversion

2009-11-23 Thread Alan Kelly
Deal list, I have a data frame (birth) with mixed variables (numeric and alphanumeric). One variable t1stvisit was originally coded as numeric with values 1,2, and 3. After attaching the data frame, this is what I see when I use str(t1stvisit) $ t1stvisit: int 1 1 1 1 1 1 1 1 2 2 ...

Re: [R] FUN argument to return a vector in aggregate function

2009-11-23 Thread Jim Lemon
On 11/23/2009 07:15 PM, utkarshsinghal wrote: Hi All, I am currently doing the following to compute summary statistics of aggregated data: a = aggregate(warpbreaks$breaks, warpbreaks[,-1], mean) b = aggregate(warpbreaks$breaks, warpbreaks[,-1], sum) c = aggregate(warpbreaks$breaks,

Re: [R] MASS loading error

2009-11-23 Thread Uwe Ligges
Erin Hodgess wrote: Hello again. I did the update and it worked well, except for one thing: the Rcmdr doesn't work anymore. Has that come up before please? Not that I know. But what does doesn't work anymore mean precisely? Uwe Thank you for all of your help. Sincerely, Erin

[R] Odp: FUN argument to return a vector in aggregate function

2009-11-23 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 23.11.2009 09:15:02: Hi All, I am currently doing the following to compute summary statistics of aggregated data: a = aggregate(warpbreaks$breaks, warpbreaks[,-1], mean) b = aggregate(warpbreaks$breaks, warpbreaks[,-1], sum) c =

Re: [R] how to tell if its better to standardize your data matrix first when you do principal

2009-11-23 Thread Uwe Ligges
masterinex wrote: Hi Hadley , I really apreciate the suggestions you gave, It was helpful , but I still didnt quite get it all. and I really want to do a good job , so any comments would sure come helpful, please understand me . Well, we try to understand you, but we do not either. I

Re: [R] Computing multivariate normal probabilities. Was: Re: Problem with Numerical derivatives (numDeriv) and mvtnorm

2009-11-23 Thread Torsten Hothorn
On Sun, 22 Nov 2009, Ravi Varadhan wrote: Hi Torsten, Hi Ravi, It would be useful to warn the users that the multivariate normal probability calculated by pmvnorm using the GenzBretz algorithm is random, i.e. the result can vary between repeated executions of the function. only if a

Re: [R] how to tell if its better to standardize your data matrix first when you do principal

2009-11-23 Thread Uwe Ligges
masterinex wrote: this is how my data matrix looks like . This is just for the first 10 observations , but the pattern is similar for the other observations. 112.3 154.25 67.75 36.2 93.1 85.2 94.5 59.0 37.3 21.9 32.0 27.4 17.1 2 6.1 173.25 72.25 38.5 93.6 83.0 98.7

Re: [R] Downloading clim.pact package

2009-11-23 Thread Uwe Ligges
ZABLONE OWITI wrote: Hi all, I am relatively a new user of R. I need assistance on how to download and install the clim.pact_2.2-39.zip. I am running R on Windows. See the manual R Installation and Administration and afterwards read ?install.packages Uwe Ligges

[R] Question about S4

2009-11-23 Thread Hun S. Tesatte
Dear R-ers, I don't understand the following, maybe someone will help me explain: setClasss('A') [1] A new('a') Error in new(a) : trying to generate an object from a virtual class (a) setClass('b', contains='a') [1] b new('b') An object of class “b” S4 Type Object In what way is B more

Re: [R] HTML help missing?

2009-11-23 Thread Antje
Thanks a lot for the hint! Antje Duncan Murdoch wrote: On 20/11/2009 7:11 AM, Antje wrote: Hey there, I'm running R 2.10 on Windows XP (Professional) and I was wondering where the HTML help window disappeared? With earlier versions everything was fine. Now I get only this old-fashioned

Re: [R] Question about S4

2009-11-23 Thread Hun S. Tesatte
PS. All class names were upper-case, I messed up while copying the code, but it has no effect on the result. Thanks for help. --Hun On Mon, 23 Nov 2009 10:28:37 +0100 Hun S. Tesatte hunsynte...@hush.com wrote: Dear R-ers, I don't understand the following, maybe someone will help me explain:

Re: [R] MASS loading error

2009-11-23 Thread Erin Hodgess
The Rcmdr menu does not appear. However, I tried an experiment: I downloaded the R-2.10.0.tar.gz file and installed via ./configure, make, and all was well for Rcmdr. Thanks, Erin 2009/11/23 Uwe Ligges lig...@statistik.tu-dortmund.de: Erin Hodgess wrote: Hello again. I did the update

Re: [R] boxplot question

2009-11-23 Thread Antje
Peter Ehlers wrote: If there's been an answer to this, I've missed it. Here's my take. Antje wrote: Hi there, I was wondering if anybody can explain to me why the boxplot ends up with different results in the following case: I have some integer data as a vector and I compare the stats of

[R] unable to use coplot function with zoo package

2009-11-23 Thread e-letter
Readers, I have tried to use the zoo package to merge datasets and then use the coplot function, but the graph is not fully created. Only the panel data is shown. Command terminal output below, with csv files. What is the meaning of the warning message? Can anyone help please?

Re: [R] Computing multivariate normal probabilities. Was: Re: Problem with Numerical derivatives (numDeriv) and mvtnorm

2009-11-23 Thread SL
Hi Torsten, Thanks for you comment. If you have some free time to spare, partial derivatives with respect to bounds and correlation coefficients would be great for pmvnorm! In complex problems, optim is not very good at estimating the hessian numerically and first order derivatives help to build

Re: [R] interaction effects in a Linear model

2009-11-23 Thread Chuck Cleland
On 11/23/2009 1:06 AM, ashok varma wrote: hello, i am fitting a Linear model using R. I have to fit the model considering all the interaction effects of order 1 of the independent variables. But I have 9 variables. So, it will be difficult for me to write all the 36 combinations in the

[R] Speed up R code

2009-11-23 Thread AnnaFowler
Hi, Im new to R and having some trouble with my code - it works, its just very slow! Ive tried lots of things, but nothing quite seems to work, so any help and suggestions would be really appreciated! I want to calculate the marginal likelihood for every element of a row of a matrix and the

Re: [R] Speed up R code

2009-11-23 Thread SL
Loops tend to dramatically increase computation time. You may re-write a vectorized version of your code if possible, i.e. use matrix algebra. Calculus is a lot faster if one can avoid loops (at least some of them) . Best, Stephane 2009/11/23 AnnaFowler a.fowle...@imperial.ac.uk: Hi, Im new to

[R] Calibration score for survival probability

2009-11-23 Thread Eleni Rapsomaniki
Good afternoon! I need to evaluate the goodness-of-fit (aka calibration) for survival probability estimates from a Cox model. I tried to use 'calibrate' in the Design package but I'm not sure if it should/would produce what I need (ie a chi-sq type statistic with a table of expected vs

[R] randomForest bug in predict.randomForest()

2009-11-23 Thread J Sousa
The NEWS of the randomForest R library mention that version 4.5-13 fixed a bug in predict.randomForest() when newdata is a matrix with no rownames. Can anyone explain what were the consequences of this bug in the predictions? I think the bug was fixed with the new line if (is.null(rn)) rn -

Re: [R] non-intuitive behaviour after type conversion

2009-11-23 Thread Peter Ehlers
Alan Kelly wrote: Deal list, I have a data frame (birth) with mixed variables (numeric and alphanumeric). One variable t1stvisit was originally coded as numeric with values 1,2, and 3. After attaching the data frame, this is what I see when I use str(t1stvisit) actually, str(birth), I

Re: [R] how do i persuade IT to install R on PCs ?? ...and should I ??

2009-11-23 Thread stephen's mailinglist account
On Sun, Nov 22, 2009 at 11:15 PM, David Winsemius dwinsem...@comcast.netwrote: On Nov 22, 2009, at 4:45 PM, stephen's mailinglist account wrote: On Sun, Nov 22, 2009 at 11:14 AM, frenchcr frenc...@btinternet.com wrote: Please help me persuade IT to install R on my computer! All

Re: [R] boxplot question

2009-11-23 Thread Peter Ehlers
Antje wrote: Peter Ehlers wrote: If there's been an answer to this, I've missed it. Here's my take. Antje wrote: Hi there, I was wondering if anybody can explain to me why the boxplot ends up with different results in the following case: I have some integer data as a vector and I compare

Re: [R] non-intuitive behaviour after type conversion

2009-11-23 Thread David Winsemius
On Nov 23, 2009, at 7:34 AM, Peter Ehlers wrote: Alan Kelly wrote: Deal list, I have a data frame (birth) with mixed variables (numeric and alphanumeric). One variable t1stvisit was originally coded as numeric with values 1,2, and 3. After attaching the data frame, this is what I

Re: [R] dynlm predict with newdata?

2009-11-23 Thread Gabor Grothendieck
The dyn package has a predict method that can typically be used to predict one step ahead (and you can use a loop to get multiple steps). To use just preface lm (or glm or any model fitting function in R that uses model.frame in the same way as lm). It works with zoo, zooreg, ts, its and irts

Re: [R] Calibration score for survival probability

2009-11-23 Thread Frank E Harrell Jr
Eleni Rapsomaniki wrote: Good afternoon! I need to evaluate the goodness-of-fit (aka calibration) for survival probability estimates from a Cox model. I tried to use 'calibrate' in the Design package but I'm not sure if it should/would produce what I need (ie a chi-sq type statistic with a

Re: [R] how do i persuade IT to install R on PCs ?? ...and should I ??

2009-11-23 Thread David Winsemius
On Nov 23, 2009, at 7:47 AM, stephen's mailinglist account wrote: On Sun, Nov 22, 2009 at 11:15 PM, David Winsemius dwinsem...@comcast.net wrote: On Nov 22, 2009, at 4:45 PM, stephen's mailinglist account wrote: On Sun, Nov 22, 2009 at 11:14 AM, frenchcr frenc...@btinternet.com

Re: [R] R: Re: chol( neg.def.matrix ) WAS: Re: Choleski and Choleski with pivoting of matrix fails

2009-11-23 Thread Peter Dalgaard
simona.racio...@libero.it wrote: It works! But Once I have the square root of this matrix, how do I convert it to a real (not imaginary) matrix which has the same property? Is that possible? No. That is theoretically impossible. If A = B'B, then x'Ax = ||Bx||^2 = 0 for any x, which implies

Re: [R] unable to use coplot function with zoo package

2009-11-23 Thread Gabor Grothendieck
You have no complete rows so how could it plot anything? If you had some complete rows then this should work: coplot(z1 ~ z2 | z3, as.data.frame(z4)) Lines1 - 09:50:00,315.79 09:50:30,325.43 09:51:00,315.53 09:51:30,313.73 09:52:00,316.11 09:52:30,331.65 09:53:00,325.31 09:53:30,334.33

[R] categorisation of continuous variables in R

2009-11-23 Thread joris meys
Dear all, I'm looking for a function comparable to switch, to categorize a continuous variable in a few levels. Off course that can be done with a series of ifelse statements, but that looks rather clumsy. I looked at switch, but couldn't figure out how to use it for this. I guess that's not

Re: [R] FUN argument to return a vector in aggregate function

2009-11-23 Thread Gabor Grothendieck
Try this: library(doBy) summaryBy(breaks ~ ., warpbreaks, FUN = c(mean, sum, length)) wool tension breaks.mean breaks.sum breaks.length 1A L44.6401 9 2A M24.0216 9 3A H24.6221 9

Re: [R] categorisation of continuous variables in R

2009-11-23 Thread joris meys
Never mind, found the function : cut(test,breaks=c(0,10,50,90,100),labels=c(lowest,low,high,highest),include.lowest=T,right=F) Cheers Joris On Mon, Nov 23, 2009 at 2:14 PM, joris meys jorism...@gmail.com wrote: Dear all, I'm looking for a function comparable to switch, to categorize a

Re: [R] categorisation of continuous variables in R

2009-11-23 Thread David Winsemius
On Nov 23, 2009, at 8:14 AM, joris meys wrote: Dear all, I'm looking for a function comparable to switch, to categorize a continuous variable in a few levels. ?cut Off course that can be done with a series of ifelse statements, but that looks rather clumsy. I looked at switch, but

Re: [R] how do i persuade IT to install R on PCs ?? ...and should I ??

2009-11-23 Thread Barry Rowlingson
On Mon, Nov 23, 2009 at 1:01 PM, David Winsemius dwinsem...@comcast.net wrote: It was a good read. We had a recent example submitted to r-help where I had occasion to test their solution 2 (use OO.org' Calc) and found it to be just as bad at curve fitting for a polynomial as had been Excel.

[R] Check if string has all alphabets or numbers

2009-11-23 Thread Harsh
Hi R users, I'd like to know if anyone has come across problems wherein it was necessary to check if strings contained all alphabets, some numbers or all numbers? In my attempt to test if a string is numeric, alpha-numeric (also includes if string is only alphabets) : # Reproducible R code below

Re: [R] Calibration score for survival probability

2009-11-23 Thread Eleni Rapsomaniki
Dear Prof. Harrell, Thank you very much for your prompt and very helpful response. I guess that since a global statistic such as a chi-sq test is not applicable in this case, the calibration curve itself from the calibration() is the most informative alternative (most graphical methods reveal more

Re: [R] Check if string has all alphabets or numbers

2009-11-23 Thread jim holtman
try this: mywords- c(harry,met,sally,subway10,1800Movies,12345) grep(^[[:alpha:]]*$, mywords) # letters [1] 1 2 3 grep(^[[:digit:]]*$, mywords) # numbers [1] 6 On Mon, Nov 23, 2009 at 8:28 AM, Harsh singhal...@gmail.com wrote: Hi R users, I'd like to know if anyone has come across

Re: [R] Check if string has all alphabets or numbers

2009-11-23 Thread jim holtman
Added a little more: mywords- c(harry,met,sally,subway10,1800Movies,12345, not correct 123) all.letters - grep(^[[:alpha:]]*$, mywords) all.numbers - grep(^[[:digit:]]*$, mywords) # numbers mixed - grep(^[[:digit:][:alpha:]]*$, mywords) all.letters [1] 1 2 3 all.numbers [1] 6 # mixed

Re: [R] how do i persuade IT to install R on PCs ?? ...and should I ??

2009-11-23 Thread Marc Schwartz
On Nov 23, 2009, at 7:24 AM, Barry Rowlingson wrote: On Mon, Nov 23, 2009 at 1:01 PM, David Winsemius dwinsem...@comcast.net wrote: It was a good read. We had a recent example submitted to r-help where I had occasion to test their solution 2 (use OO.org' Calc) and found it to be just as

Re: [R] Over-coloring facets on persp() plot

2009-11-23 Thread Marc Chiarini (Tufts)
Thanks Duncan (and David). I couldn't get back to my computer until today. I understand it pretty well now and I'm able to get what I need. On a side note, I have had a hard time getting rgl to work. For the moment, I have to compile without libpng and ftfonts, and when I load the package

Re: [R] How to add a top level title to multiple plots

2009-11-23 Thread Jason Rupert
In the example below, is there any way to get the top title, i.e. Distribution Comparisons, in a bit from the top margin?  Thanks agian   - Original Message From: Jason Rupert jasonkrup...@yahoo.com To: Peter Ehlers ehl...@ucalgary.ca Cc: R Project Help R-help@r-project.org; Me

Re: [R] Over-coloring facets on persp() plot

2009-11-23 Thread Duncan Murdoch
On 23/11/2009 8:55 AM, Marc Chiarini (Tufts) wrote: Thanks Duncan (and David). I couldn't get back to my computer until today. I understand it pretty well now and I'm able to get what I need. On a side note, I have had a hard time getting rgl to work. For the moment, I have to compile

Re: [R] Check if string has all alphabets or numbers

2009-11-23 Thread hadley wickham
mywords- c(harry,met,sally,subway10,1800Movies,12345, not correct 123) all.letters - grep(^[[:alpha:]]*$, mywords) all.numbers - grep(^[[:digit:]]*$, mywords)  # numbers mixed - grep(^[[:digit:][:alpha:]]*$, mywords) mywords- c(harry,met,sally,subway10,1800Movies,12345, not correct 123, )

Re: [R] other decriptive stats packages

2009-11-23 Thread Matthieu Lesnoff
are there any more packages that help decribe and explore data sets package tdisplay at http://forums.cirad.fr/logiciel-R/viewtopic.php?t=2409 Details: display-packageTool Box for Data Importation and Display import Import Data From External Data Bases

Re: [R] How to add a top level title to multiple plots

2009-11-23 Thread David Winsemius
On Nov 23, 2009, at 8:58 AM, Jason Rupert wrote: In the example below, is there any way to get the top title, i.e. Distribution Comparisons, in a bit from the top margin? You could use instead: title(\nDistribution Comparisons, outer = TRUE) And please correct the spelling of Poisson.

Re: [R] Speed up R code

2009-11-23 Thread AnnaFowler
Thanks Stephane, Thats a great help! SL-16 wrote: Loops tend to dramatically increase computation time. You may re-write a vectorized version of your code if possible, i.e. use matrix algebra. Calculus is a lot faster if one can avoid loops (at least some of them) . Best, Stephane

[R] Re adline()

2009-11-23 Thread yonosoyelmejor
Hello, I would like to ask you a question.I have a program in R and I use the readline method to ask the user some things,but i don´t use the R console but I use Win console then not appear what I put.I put the code as you look for: cat(1- 24horas\n) cat(2- 12horas\n) cat(3- 8horas\n)

[R] R: chol( neg.def.matrix ) WAS: Re: Choleski and Choleski with pivoting of matrix fails

2009-11-23 Thread simona.racio...@libero.it
Thanks Chuck! It works! But Once I have the square root of this matrix, how do I convert it to a real (not imaginary) matrix which has the same property? Is that possible? Best, Simon Messaggio originale Da: cbe...@tajo.ucsd.edu Data: 21-nov-2009 18.11 A:

[R] R: Re: chol( neg.def.matrix ) WAS: Re: Choleski and Choleski with pivoting of matrix fails

2009-11-23 Thread simona.racio...@libero.it
It works! But Once I have the square root of this matrix, how do I convert it to a real (not imaginary) matrix which has the same property? Is that possible? Best, Simon Messaggio originale Da: p.dalga...@biostat.ku.dk Data: 21-nov-2009 18.56 A: Charles C. Berrycbe...@tajo.ucsd.edu Cc:

[R] Excel-Export

2009-11-23 Thread koj
Dear all, i use the following package/syntax to export data to excel: library(xlsReadWrite) write.xls( exportdata,pfad,colNames = TRUE,sheet = 1,from = 1,rowNames = FALSE ) Everything is fine, but the format of the export is not the best. For example, I every time have to adjust the column

Re: [R] R-help Digest, Vol 81, Issue 23

2009-11-23 Thread Thushyanthan Baskaran
Hi, keine ahnung. Das liegt jetzt bei Hr. Feld. Frag mal bei ihm nach. Grüße Thushyanthan r-help-requ...@r-project.org wrote: Send R-help mailing list submissions to r-help@r-project.org To subscribe or unsubscribe via the World Wide Web, visit

[R] testing of randomness of residuals in the lm function in R

2009-11-23 Thread ashok varma
Hello, I am fitting a Linear model using R. Now, i want to know how to test whether my model is following the homoscadasticity and residuals being random assumptions or not while fitting the model. thanks a lot in advance, Ashok Varma [[alternative HTML version deleted]]

[R] heatmap.2 adapting the colour scale and text overlay

2009-11-23 Thread Daniel Brewer
Hello, I am using heatmap.2 from the gplots library to plot a small symmetrical matrix. This is the command: heatmap.2(tempHeat,symm=T,trace=none,cexRow=0.7,cexCol=0.7,col=redgreen,density.info=none) I have a couple of questions: 1) The range is from -0.2 to 0.4 and the colour scheme I am

Re: [R] How to add a top level title to multiple plots

2009-11-23 Thread Peter Ehlers
Jason Rupert wrote: In the example below, is there any way to get the top title, i.e. Distribution Comparisons, in a bit from the top margin? Thanks agian Your par(oma=...) needs to come _before_ plotting; make it the first statement. In addition, title() takes a line= argument; try

[R] anova() method for coxph objects with robust standard errors

2009-11-23 Thread Mura Tamakou
Hi all, what is the reason why the anova() method for coxph objects does not work when robust standard errors have been requested, e.g., fit - coxph(Surv(futime, fustat) ~ resid.ds *rx + ecog.ps, data = ovarian, robust = T) anova(fit) any pointers will be much appreciated. Sincerely, Mura

[R] calling R from java eclipse

2009-11-23 Thread thierry CHEKOUO T.
Dear R Java users I have the problems with calling R from Java (JRE6) on Windows. After running, we have: # # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc005) at pc=0x6c7330c0, pid=1436, tid=6200 # # JRE version: 6.0_17-b04 #

[R] find distance between two points with different scale

2009-11-23 Thread marten
i have a dataset with x and y values. i want to randomly select a point on the x-axis between the smallest and largest x-value and use a y value of zero for them. Next, for each randomly selected point {x[i],0}i want to find the point in the {x,y} space which is closest to them. However, as seen

Re: [R] Re adline()

2009-11-23 Thread Peter Dalgaard
yonosoyelmejor wrote: Hello, I would like to ask you a question.I have a program in R and I use the readline method to ask the user some things,but i don´t use the R console but I use Win console then not appear what I put.I put the code as you look for: cat(1- 24horas\n) cat(2- 12horas\n)

Re: [R] heatmap.2 adapting the colour scale and text overlay

2009-11-23 Thread David Winsemius
On Nov 23, 2009, at 10:02 AM, Daniel Brewer wrote: Hello, I am using heatmap.2 from the gplots library to plot a small symmetrical matrix. This is the command: heatmap. 2 (tempHeat ,symm = T ,trace =none,cexRow=0.7,cexCol=0.7,col=redgreen,density.info=none) I have a couple of

Re: [R] Excel-Export

2009-11-23 Thread Henrique Dallazuanna
Use the RDCOMClient package from omegahat.org. On Mon, Nov 23, 2009 at 11:02 AM, koj jens.k...@gmx.li wrote: Dear all, i use the following package/syntax to export data to excel: library(xlsReadWrite) write.xls( exportdata,pfad,colNames = TRUE,sheet = 1,from = 1,rowNames = FALSE )

Re: [R] Excel-Export

2009-11-23 Thread Marc Schwartz
On Nov 23, 2009, at 7:02 AM, koj wrote: Dear all, i use the following package/syntax to export data to excel: library(xlsReadWrite) write.xls( exportdata,pfad,colNames = TRUE,sheet = 1,from = 1,rowNames = FALSE ) Everything is fine, but the format of the export is not the best. For

[R] get.gpar, grid.Call

2009-11-23 Thread Christian Hoffmann
Hi I have been unable to find information on the following problem: Error in get.gpar(): unable to find function grid.Call Reinstalling R-2.10.0, platform: i386-pc-mingw32 did not help. Before this message there was a get.gpar missing. We then transported the source code from another machine

[R] Friedman test for replicated blocked data

2009-11-23 Thread Pepe Trujillo
Dear Marco: Look in agricolae package. There is a Friedman test with and without replicates. In this package is used the Conover's book as a reference. Greetings, Dr. D. José Trujillo Carmona Dpt. of Mathematics Fac. of Science of Badajoz Univ. of Extremadura Spain From: Marco Chiarandini

[R] List Name help

2009-11-23 Thread Rajasekaramya
Hi There, I have a named List object.I want to access all the list elements that has the same name for example The List test - list() $d2 v1 v2 v3 v4 1 2 3 4 5 $d2 v1 v2 v3 v4 1 2 3 4 5 $d3 v1 v2 v3 v4 8 9 19 10 $d1 v1 v2 v3 v4 12 14 15 16 so if i say test[[d2]] or test[d2] i should get the

[R] Natural colours for topographic data

2009-11-23 Thread Karl Ove Hufthammer
Dear list members I'm currently working on some topographic (elevation) data, and was somewhat surprised that the 'topo.colors' and 'terrain.colors' are of little to no use here. The problem is that these functions only return a palette of colours; they don't map depth values to colours. So

Re: [R] List Name help

2009-11-23 Thread Henrique Dallazuanna
Try this: test[grep(d2, names(test))] On Mon, Nov 23, 2009 at 2:53 PM, Rajasekaramya ramya.vict...@gmail.com wrote: Hi There, I have a named List object.I want to access all the list elements that has the same name for example The List test - list() $d2 v1 v2 v3 v4 1 2 3 4 5 $d2 v1

Re: [R] get.gpar, grid.Call

2009-11-23 Thread Uwe Ligges
Christian Hoffmann wrote: Hi I have been unable to find information on the following problem: Error in get.gpar(): unable to find function grid.Call Reinstalling R-2.10.0, platform: i386-pc-mingw32 did not help. Before this message there was a get.gpar missing. We then transported the

Re: [R] Natural colours for topographic data

2009-11-23 Thread David Winsemius
On Nov 23, 2009, at 11:52 AM, Karl Ove Hufthammer wrote: Dear list members I'm currently working on some topographic (elevation) data, and was somewhat surprised that the 'topo.colors' and 'terrain.colors' are of little to no use here. The problem is that these functions only return a

Re: [R] Define return values of a function

2009-11-23 Thread Greg Snow
If you want to control what gets printed in the output of your function, then you need to get into creating classes and methods. Choose a class to return from your function, and create a print method for that class, then when you run your function the output will cause the print method to be

Re: [R] Fitting a mixture of poisson

2009-11-23 Thread Jim Silverton
Hello, I would like to find out how to get the fit from a mixture of poisson. For example, suppose I know the Y = 0.25*Poisson(2) + 0.75*Poisson(10) then if I have say y = 4, how do I get the fitted value for y? [[alternative HTML version deleted]]

Re: [R] testing of randomness of residuals in the lm function in R

2009-11-23 Thread Uwe Ligges
ashok varma wrote: Hello, I am fitting a Linear model using R. Now, i want to know how to test whether my model is following the homoscadasticity and residuals being random assumptions or not while fitting the model. See ?lm. For accessing residuals, see ?residuals. Or use plot() on a lm

Re: [R] non-intuitive behaviour after type conversion

2009-11-23 Thread Don MacQueen
When you attach() something, it loads it into memory and there it stays. It is not a link, reference, or pointer to the original. Changing the original (the version in the dataframe), which is what you did, does not change the attached copy in memory. In essence, you did a type conversion on

[R] NAs introduced by coercion warning?

2009-11-23 Thread Omar Gonzalez Post
I'm running cluster analysis on a data frame but when I calculate the distance I get this warning NAs introduced by coercion. What does this mean? [[alternative HTML version deleted]] __

Re: [R] Error using 32-bit R and RODBC package on 64-bit Windows Server OS with R version 2.10

2009-11-23 Thread helpme
Thank you for the link to the 32 bit Windows Oracle downloads for the Instant Client. That solved the problem. I'm now able to connect to Oracle database from R using the RODBC library. Thank you Mark! -Melanie On Wed, Nov 18, 2009 at 6:23 PM, Marc Schwartz marc_schwa...@me.com wrote: Just

Re: [R] How do I specify a partially completed survival analysis model?

2009-11-23 Thread David Winsemius
On Nov 20, 2009, at 1:27 PM, David Winsemius wrote: On Nov 20, 2009, at 11:07 AM, RWilliam wrote: In reply to suggestion by David W., setting an offset parameter doesn't seem to work as R is not recognizing the X2 part of coxph( Surv(Time,Censor)~X1, offset=log(4.3*X2), data= a ).

[R] Analyzing XML data

2009-11-23 Thread skyjo
I would like to analyze XML data from MLB's website. I do the following steps: library(XML) dat-http://gd2.mlb.com/components/game/mlb/year_2007/month_05/day_02/gid_2007_05_02_arimlb_lanmlb_1/inning/inning_1.xml; example- xmlTreeParse(dat, useInternalNodes=T) ex-xpathApply(example,

[R] Loess Fit

2009-11-23 Thread Christian Miner
I'm working on Loess fit models using R, once I have the fit accomplished, I'm looking to back-out the equation of the fitted non-linear curve, wondering if there is a way to determine this equation in R? I've been looking but can't find any literature. For me, the graph of the function is great,

[R] Different fonts on the same axis

2009-11-23 Thread MichelleJ
Hi, I need to have both italics and standard font on the y axis. This is my script: plot(x,y,pch=16,xlab=metric,ylab=species CPUE) I want species in italics and CPUE in standard text. Any tips would be appreciated. Thanks. -- View this message in context:

Re: [R] interaction effects in a Linear model

2009-11-23 Thread ashok varma
Hi Cleland and Dennis, thanks a lot for the answer. Ashok Varma On Mon, Nov 23, 2009 at 5:05 PM, Chuck Cleland cclel...@optonline.netwrote: On 11/23/2009 1:06 AM, ashok varma wrote: hello, i am fitting a Linear model using R. I have to fit the model considering all the interaction

[R] NAs introduced by coercion

2009-11-23 Thread post009
I'm running cluster analysis on a data frame but when I calculate the distance I get this warning NAs introduced by coercion. What does this mean? -- View this message in context: http://old.nabble.com/NAs-introduced-by-coercion-tp26482683p26482683.html Sent from the R help mailing list

[R] vegan package: goodness.cca function

2009-11-23 Thread L Quinn
Hello, I am posting this to R-help and Ecolog-L, in hopes that enough Ecologgers are R users and enough R-help users are ecologists. Please forgive the cross-posting. I deleted a number of species from a canonical correspondence analysis (CCA) model after using the function goodness.cca in

Re: [R] Different fonts on the same axis

2009-11-23 Thread Peter Alspach
Tena koe Michelle ?plotmath For your particular example, try: plot(1:10, 1:10, pch=16, xlab=metric, ylab=quote(~italic(species)~ ' CPUE')) Depending on your default font, you might need to set the family argument of par(): par(family='serif') HTH Peter Alspach -Original

Re: [R] Check if string has all alphabets or numbers

2009-11-23 Thread jim holtman
Here is the way you can use grepl to get the various combinations: mywords- c(harry,met,sally,subway10,1800Movies,12345, + not correct 123, ) numbers - grepl(^[[:digit:]]+$, mywords) letters - grepl(^[[:alpha:]]+$, mywords) both - grepl(^[[:digit:][:alpha:]]+$, mywords) mywords[letters]

Re: [R] Loess Fit

2009-11-23 Thread David Winsemius
On Nov 23, 2009, at 2:03 PM, Christian Miner wrote: I'm working on Loess fit models using R, once I have the fit accomplished, I'm looking to back-out the equation of the fitted non-linear curve, wondering if there is a way to determine this equation in R? I've been looking but can't find

Re: [R] Loess Fit

2009-11-23 Thread Thomas S. Dye
Hi Christian, Do you have a reference to a publication where this has been done? All the best, Tom On Nov 23, 2009, at 10:15 AM, Christian Miner wrote: it's a tricky maneuver. When I finish the fit, the predict function will give me the values, and I can smooth this out so it looks like

Re: [R] Loess Fit

2009-11-23 Thread Greg Snow
Check out the loess.demo function in the TeachingDemos package. Using this function with your data will show the scatterplot with the loess curve. Then if you click in the plot it will show the line/curve used to do the prediction for that x-value, click on another x-value and you will see

[R] using contents of one column to direct addition of new rows in dataframe

2009-11-23 Thread Jessi Brown
Hello, R gurus. I've been trying to get R to do some data manipulation for me, and so far have been stumped in figuring out any elegant way to do so. Searches through the R-help archive haven't helped, so now I'm trying plan B. Suppose I have a dataframe that summarizes events that took place

Re: [R] Loess Fit

2009-11-23 Thread Thomas S. Dye
Thanks Christian. The client is always right ... Tom On Nov 23, 2009, at 10:32 AM, Christian Miner wrote: sorry, I don't. I have data that I can estimate, but my client wants to What if... 20 separate scenarios, and that requires a function. On Mon, Nov 23, 2009 at 12:22 PM, Thomas S.

Re: [R] testing of randomness of residuals in the lm function in R

2009-11-23 Thread Tal Galili
Hi Ashok, You can try : *shapiro.test(**my.lm$resid**)* But I remember reading that good tests for the normality assumptions (specifically that of the residuals), do not exist as we would have hoped them to. Good luck, Tal Contact

Re: [R] How to make a cartesian pairlist from a vector?

2009-11-23 Thread newbyr
This is very helpful. Thank you very much. Charles C. Berry wrote: On Fri, 20 Nov 2009, newbyr wrote: Hi, I'm looking for a function that will take a list of columns or data.frame and corvert it to cartesian pairlist. For example for this data.frame (see below), I'd like to get a

Re: [R] Loess Fit

2009-11-23 Thread Greg Snow
If the client is always right, then what do they need us for? If you need a function to reproducibly generate predictions, then use loess to generate a set of predictions for a reasonably dense set of x-values, then use approxfun or splinefun to create a function to interpolate for you. Then

Re: [R] Loess Fit

2009-11-23 Thread Christian Miner
Thanks, I'll try that. What is the output of approxfun? On Mon, Nov 23, 2009 at 1:03 PM, Greg Snow greg.s...@imail.org wrote: If the client is always right, then what do they need us for? If you need a function to reproducibly generate predictions, then use loess to generate a set of

Re: [R] serialized plot object (2 years later)

2009-11-23 Thread Tobias Verbeke
Hi Jack, Jack Tanner wrote: About 2 years ago, Tobias Verbeke asked: I am looking for a way to capture the binary string that in normal use of graphics devices will bewritten to (most commonly) a file connection... Is there a way of capturing the binary `jpeg string' [generated by jpeg()]?

Re: [R] Loess Fit

2009-11-23 Thread Greg Snow
approxfun returns a function, give this function an x-value and it will give you the prediction (linear interpolation from the points that you gave to approxfun). The splinefun function also returns a function, but it gives a spline interpolation rather than a linear one. -- Gregory (Greg) L.

Re: [R] Loess Fit

2009-11-23 Thread Christian Miner
What if you wanted to do this with multiple x's, multivariate, rather than just 1 x variable? On Mon, Nov 23, 2009 at 1:09 PM, Greg Snow greg.s...@imail.org wrote: approxfun returns a function, give this function an x-value and it will give you the prediction (linear interpolation from the

  1   2   >