Re: [R] Grouping data in dataframe

2009-07-14 Thread Dieter Menne
Timo Schneider wrote: > > > I have a dataframe (obtained from read.table()) which looks like > > ExpA ExpB ExpC Size > 1 12 2333 1 > 2 12 2429 1 > 3 10 2234 1 > 4 25 5060 2 > 5 24 5362 2 > 6

Re: [R] (simple) xml into data.frame and reverse

2009-07-14 Thread Dieter Menne
Duncan Temple Lang wrote: > > > > I wrote some relatively general functions, but hastily written functions > to read this sort of data. You can find them attached or at > >http://www.omegahat.org/RSXML/xmlToDataFrame.xml > > Looks like that's the wrong link. I also did not find it men

Re: [R] Correlation question (from a newbie)

2009-07-14 Thread Santosh
Dear R-users please ignore my most recent posting.. Found the solution.. Thanks to David Winsemius.. Thanks, Santosh On Tue, Jul 14, 2009 at 9:14 PM, Santosh wrote: > Dear R-users.. > > I hope the following scenario is more explanatory of my question.. > > Continuous variables: AGE, WEIGH

Re: [R] How do I know where is R? - VB Programming

2009-07-14 Thread Peter Dalgaard
Duncan Murdoch wrote: On 14/07/2009 7:22 PM, Haoda Fu wrote: Dear all - Is there anyone know how to let VB or C# know where I install R automatically(i.e. auto detect R directory)? On Windows if you run the installer it will record its location in the registry, under *\Software\R-core\R\, w

Re: [R] (simple) xml into data.frame and reverse

2009-07-14 Thread Duncan Temple Lang
stefan.d...@gmail.com wrote: Hello, I am trying to convert a simple data.frame (it will always be a few equally long variables) into the XML format (which I don't understand too well but need as input for another program) and reverse the operation (from XML back into data.frame). I found some

Re: [R] Standalone program from R script

2009-07-14 Thread Gabor Grothendieck
That list does include two PHP interfaces! Suggest you review it again. Alternately it may be sufficient to simply call an Rscript batch process from PHP via exec or shell_exec. On Tue, Jul 14, 2009 at 11:53 PM, Tanmoy Talukdar wrote: > Thanks for the help, but that thread just gives some copy-

Re: [R] dse model setup help

2009-07-14 Thread spencerg
I can't identify the problem. The package author and maintainer, Paul Gilbert, might be able to help. Have you tried "debug(SS)"? This will allow you to walk through the function line by line looking at things, etc. This often produces enlightenment. Alternatively, have

Re: [R] Correlation question (from a newbie)

2009-07-14 Thread Santosh
Dear R-users.. I hope the following scenario is more explanatory of my question.. Continuous variables: AGE, WEIGHT, HEIGHT Categorical variables: Group, Sex, Race I would like to find a correlation between WEIGHT and AGE, grouped by "Group","Sex", and "Race". Is the following formula correct? t

Re: [R] Standalone program from R script

2009-07-14 Thread Cedrick Johnson
You could perhaps try Rserve (I'm not sure of your level of familiarity with Java, and the full functionality required of your application) or . >From Gabor's link: Take a look at Rwui: http://rwui.cryst.bbk.ac.uk/ Or, my roundabout way of solving problems like this suits you: Basically if a

[R] Simulation functions for underdispered Poisson and binomial distributions

2009-07-14 Thread Shinichi Nakagawa
Dear R users I would like to simulate underdispersed Poisson and binomial distributions somehow. I know you can do this for overdispersed counterparts - using rnbinom() for Poisson and rbetabinom() for binomial. Could anyone share functions to do this? Or please share some tips for modi

[R] Snow/openmpi

2009-07-14 Thread bfoubert
I'm running R/snow on a small cluster with opensuse, openmpi, and openshh. I start up R with "mpirun -n 1 R --no-save". That works but it strikes me how easily I get kicked out of R whenever I run into syntax errors. Is there a way to avoid this, for instance, by starting up a regular R session an

Re: [R] Grouping data in dataframe

2009-07-14 Thread Moshe Olshansky
Try ?aggregate --- On Wed, 15/7/09, Timo Schneider wrote: > From: Timo Schneider > Subject: [R] Grouping data in dataframe > To: "r-help@r-project.org" > Received: Wednesday, 15 July, 2009, 1:56 PM > Hello, > > I have a dataframe (obtained from read.table()) which looks > like > >   >    Ex

Re: [R] Grouping data in dataframe

2009-07-14 Thread Peter Alspach
Tena koe Timo ?aggregate HTH ... Peter Alspach > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Timo Schneider > Sent: Wednesday, 15 July 2009 3:56 p.m. > To: r-help@r-project.org > Subject: [R] Grouping data in dataframe >

[R] Grouping data in dataframe

2009-07-14 Thread Timo Schneider
Hello, I have a dataframe (obtained from read.table()) which looks like ExpA ExpB ExpC Size 1 12 2333 1 2 12 2429 1 3 10 2234 1 4 25 5060 2 5 24 5362 2 6 21 4961 2 now I want to

Re: [R] Standalone program from R script

2009-07-14 Thread Tanmoy Talukdar
Thanks for the help, but that thread just gives some copy-pasted information from the FAQ, which I've already read. The R-Pad project is recommended there and that site seems to be down. Is there any way to porting R-code to PHP ? That 'll be great enough for me. On Wed, Jul 15, 2009 at 9:07 AM, G

[R] POSIX, timezones and R-ODBC

2009-07-14 Thread Cedrick Johnson
Howdy- I recently upgraded to R 2.9.1 and did the updates for all of my packages. A few of them now *suggest* the TZ variable to be set, which I did: > Sys.getenv("TZ") TZ "" > Sys.setenv(TZ="America/New_York") > Sys.getenv("TZ") TZ "America/New_York" Next up: library(RODBC)

Re: [R] Standalone program from R script

2009-07-14 Thread Gabor Grothendieck
Some of the possibilities are listed here: http://tolstoy.newcastle.edu.au/R/e6/help/09/03/8967.html On Tue, Jul 14, 2009 at 11:26 PM, Tanmoy Talukdar wrote: > I have written a program which deals with median in 2-D plane and the > property of it under rotation. The program takes the co-ordinates

Re: [R] ifultools on ppc debian

2009-07-14 Thread Moshe Olshansky
Hi Stephen, The error message clearly says what is wrong. Big Endian and Little Endian are two ways of storing data (mostly often double precision numbers) in memory. A double precision number occupies two blocks of 4 bytes each. On Big Endian machines (most machines which are not Intel) if the

[R] Standalone program from R script

2009-07-14 Thread Tanmoy Talukdar
I have written a program which deals with median in 2-D plane and the property of it under rotation. The program takes the co-ordinates through mouse-click at any point of the co-ordinate plane and then does the necessary computations. But the guys for whom I wrote the program , are now demanding a

[R] Averaging dataframes that are stored in a list

2009-07-14 Thread Mark Na
Dear R-helpers, I have a list containing 5000 elements, each element is a dataframe containing one ID column (identical over the 5000 dataframes) and 9 numeric variables, e.g. ID VAR1 VAR2 VAR3 ... VAR9 I would like to create a new dataframe containing the ID column and the mean values of the 9 n

Re: [R] Correlation question (from a newbie)

2009-07-14 Thread David Winsemius
On Jul 14, 2009, at 10:34 PM, Santosh wrote: Hi R-users, Was wondering if there is a way to quickly compute correlations between continuous variables grouped by some categorical variables? What function do I use? ?tapply ?by Thanks much in advance. Regards, Santosh [[alterna

[R] Correlation question (from a newbie)

2009-07-14 Thread Santosh
Hi R-users, Was wondering if there is a way to quickly compute correlations between continuous variables grouped by some categorical variables? What function do I use? Thanks much in advance. Regards, Santosh [[alternative HTML version deleted]] ___

[R] ifultools on ppc debian

2009-07-14 Thread stephen sefick
I have tried to compile this from source. I don't know what Endianess is, but it is probably not debian power pc. Am I would of luck with this package? Stephen Sefick * Installing *source* package ‘ifultools’ ... ** libs gcc -std=gnu99 -I/usr/local/lib/R/include -I"../inst/include/" -D"MUTIL_ST

[R] Read PNG file and display with more than 256 colors RGDAL

2009-07-14 Thread Paul.Rustomji
Hello list I am trying to use a Googlemaps tile (png file, 640 X 640 px tile) as a background to a plot and have been using the rgdal library to read in the PNG file (modified from code in the RGoogleMaps package). This works OK. My problem is is that the SGDF2PCT function in rgdal seems to b

[R] Matrix multiplication precision

2009-07-14 Thread Nair, Murlidharan T
Hi!! I am trying to multiply 5 matrices and then using the inverse of that matrix for further computation. I read about precision problems from the archives and the suggestion was to use as.numeric while computing the products. I am still having problems with the results. Here is how I am using

Re: [R] How to combine two data frames by ID

2009-07-14 Thread jim holtman
?merge On Tue, Jul 14, 2009 at 9:07 PM, Christopher Desjardins wrote: > Hi, > > I am trying to combine two data frames by ID. The first data frame is the > whole data set and the second data frame is a subset of the first. What I > would like to do is take the values from variable, p1, from the se

[R] How to combine two data frames by ID

2009-07-14 Thread Christopher Desjardins
Hi, I am trying to combine two data frames by ID. The first data frame is the whole data set and the second data frame is a subset of the first. What I would like to do is take the values from variable, p1, from the second data frame and merge them back into that variable in the first data fr

Re: [R] getting a timeseries element into a string

2009-07-14 Thread spencerg
Hello: 1. I tried the example. The first thing I noticed was that "library(fSeries)" loaded with the following comment: # The new version of 'fSeries' has been renamed to 'timeSeries' 2. With this, I tried "library(timeSeries)". Then your first example worked without error

Re: [R] SOS! error in GLM logistic regression...

2009-07-14 Thread Ben Bolker
losemind wrote: > > Hi all, > > Could anybody tell me what happened to my logistic regression in R? > mylog=glm(mytraindata$V1 ~ ., data=mytraindata, family=binomial("logit")) > > It generated the following error message: > > Error in model.frame.default(Terms, newdata, na.action = na.action

Re: [R] How do I know where is R? - VB Programming

2009-07-14 Thread Gabor Grothendieck
For some examples of using the R registry entries see Rcmd.bat, Rversions.bat and Rversions.hta in the batchfiles distribution whose home page is: http://batchfiles.googlecode.com On Tue, Jul 14, 2009 at 7:22 PM, Haoda Fu wrote: > > Dear all - > > Is there anyone know how to let VB or C# know wher

Re: [R] How do I know where is R? - VB Programming

2009-07-14 Thread Duncan Murdoch
On 14/07/2009 7:22 PM, Haoda Fu wrote: Dear all - Is there anyone know how to let VB or C# know where I install R automatically(i.e. auto detect R directory)? On Windows if you run the installer it will record its location in the registry, under *\Software\R-core\R\, where * is HKLM or HKCU,

Re: [R] nls, reach limit bounds

2009-07-14 Thread Ravi Varadhan
I took a quick look at "drc"package and the "drm" function. The drm() function uses optim ("BFGS" method). So, that is one diffference. However, without looking at your code on how you used drm(), I cannot tell further. The fact that you got an answer using optim() does not necessarily mean t

[R] How do I know where is R? - VB Programming

2009-07-14 Thread Haoda Fu
Dear all - Is there anyone know how to let VB or C# know where I install R automatically(i.e. auto detect R directory)? Many thanks! Best, Haoda __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the po

Re: [R] How to order an data.table by values of an column?

2009-07-14 Thread Matthew Dowle
If the question really meant to say "data.table" (i.e. package "data.table") then its easier than the data.frame answer. dt = data.table(Categ=c(468,351,0,234,117),Perc=c(31.52,27.52,0.77,22.55,15.99)) dt[order(Categ)] Notice there is no dt$ required before dt$Categ. Also note the comma is opti

Re: [R] nls, reach limit bounds

2009-07-14 Thread UyenThao Nguyen
Hi Ravi and Spencer, Thank you very much for your help. I did plot the data, and saw that the data didn't seem to have an inflection point. Yes, the data contained 6 points of duplicates, which the 4 P logistic regression is appropriate to use. I tried the dose response model (drm in drc pack

[R] SOS! error in GLM logistic regression...

2009-07-14 Thread Michael
Hi all, Could anybody tell me what happened to my logistic regression in R? mylog=glm(mytraindata$V1 ~ ., data=mytraindata, family=binomial("logit")) It generated the following error message: Error in model.frame.default(Terms, newdata, na.action = na.action, xlev = object$xlevels) : factor 's

[R] nnet function - help!

2009-07-14 Thread Lars Bishop
Dear experts, I'm new in R. I'd like to know if I need to standarize the input variables prior to using the nnet function or does this function standarizes the variables internally? In the first case, is there a fast way to standarize continuous and categorical inputs? Thanks Lars. [[a

[R] (simple) xml into data.frame and reverse

2009-07-14 Thread stefan.d...@gmail.com
Hello, I am trying to convert a simple data.frame (it will always be a few equally long variables) into the XML format (which I don't understand too well but need as input for another program) and reverse the operation (from XML back into data.frame). I found some code which does the first and it

[R] SweaveListingUtils question

2009-07-14 Thread Karsten Weinert
Hello group, recently I read about the SweaveListingUtils package and now I would like to try it out. However I can not make it run... Below is a minimal example. The problem seems the following line, generated by the package: \ifthenelse{\boolean{swe...@gin}}{\setkeys{gin}{width=0.6\textwidth}}{}

Re: [R] Nonlinear Least Squares nls() programming help

2009-07-14 Thread spencerg
1. What does "i" in your formula represent? Have you worked the examples in the "nls" help page, and do you understand how it works? "nls" tries to do vector computations. 2. Unfortunately, "nls" often quits with errors like "singular convergence". A standard way around that p

Re: [R] problems with contrast matrix

2009-07-14 Thread Greg Snow
Your contrasts are not linearly independent and therefore there are an infinite number of possible correct answers, this tends to confuse computers (take 1/3 times the 3rd col, plus 2/3 times the 4th col, plus 3/3 times the 5th col and compare that to the 1st col). You need to replace one of th

Re: [R] Trig functions strange results

2009-07-14 Thread Stavros Macrakis
On Tue, Jul 14, 2009 at 1:45 PM, Nair, Murlidharan T wrote: > I am trying to calculate coordinate transformations and in the process of > debugging my code using debug I found the following > > Browse[1]> direction[i] > [1] -1.570796 > Browse[1]> cos(direction[i]) > [1] 6.123032e-17 > Browse[1]>

Re: [R] hi, how can we avoid maskiing error in R

2009-07-14 Thread Steve Lianoglou
I wrote a script in which there is a for group, In that for loop i am For group? Did you mean loop there, also? reading 4 files and plotting. while plotting it shows previous variable is masking like that it is showing. Can you just paste your code into an email? It might be easier to see

Re: [R] How to import BIG csv files with separate "map"?

2009-07-14 Thread Steve Lianoglou
Hi, On Jul 14, 2009, at 1:53 PM, giusto wrote: Hi all, I am having problems importing a VERY large dataset in R. I have looked into the package ff, and that seems to suit me, but also, from all the examples I have seen, it either requires a manual creation of the database, or it needs a

Re: [R] How to import BIG csv files with separate "map"?

2009-07-14 Thread Gabor Grothendieck
Either of the following can be done in one line of code: Using the nrows and skip arguments to read.table one can read in a subset of rows. Using the colClasses argument of read.table the class "NULL" will suppress reading in the corresponding column. read.csv.sql from the sqldf package will cr

Re: [R] Trig functions strange results

2009-07-14 Thread Nair, Murlidharan T
I had some doubts that it may be due to precision. The value stored in direction[i] is (0-90)*pi/180 How can I specify the precision to be used in computation to R? Thanks ../Murli -Original Message- From: jim holtman [mailto:jholt...@gmail.com] Sent: Tuesday, July 14, 2009 2:44 PM To

Re: [R] hi, how can we avoid maskiing error in R

2009-07-14 Thread deepak m r
I wrote a script in which there is a for group, In that for loop i am reading 4 files and plotting. while plotting it shows previous variable is masking like that it is showing. On Tue, Jul 14, 2009 at 1:05 PM, Charles C. Berry wrote: > On Tue, 14 Jul 2009, deepak m r wrote: > >> Hi, >>  How can

[R] How to import BIG csv files with separate "map"?

2009-07-14 Thread giusto
Hi all, I am having problems importing a VERY large dataset in R. I have looked into the package ff, and that seems to suit me, but also, from all the examples I have seen, it either requires a manual creation of the database, or it needs a read.table kind of step. Being a survey kind of data the

[R] Comprehensive power analysis/sample size package in R?

2009-07-14 Thread ukoenig
Dear all, my colleague (a statistician - not yet using R) aked me, if there is a R package comparable to the software "PASS" (Power Analysis and Sample Size Procedures), comprising about 150 procedures. I found the R package "pwr". Are there other (more comprehensive) power analysis packages?

Re: [R] paste (" " x " ")

2009-07-14 Thread Thomas Roth (geb. Kaliwe)
maybe this helps x = "\"test\"" plot(1:10, main = x) #heading contains " " #or cat("\"test\"") Thomas Roth Paulo E. Cardoso schrieb: maybe a very basic question but I need to parse an SQL code into a GIS from a ODBC conn. The code includes a specific sentence OPTIONS COORDSYS("Latit

Re: [R] Proper Paste for Data Member

2009-07-14 Thread David Winsemius
On Jul 14, 2009, at 2:19 PM, David Winsemius wrote: On Jul 14, 2009, at 2:02 PM, Idgarad wrote: I imported a spreadsheet into a variable sh e.g. sh$, sh$, etc... doing the following: tsSource <- ts(paste("sh$",NAMEVARIABLE,sep="") ... ) From prior experience, my guess is that yo

Re: [R] Problem with GroupedData

2009-07-14 Thread Kingsford Jones
Hi Fir, Are you sure data2 is a data frame? The error message suggests it isn't. Try class(data2) or str(data2) if you're not sure. On another note -- perhaps it's better to avoid using groupedData. I've used the nlme library for years without ever using the grouped structure. My opinion is th

Re: [R] Trig functions strange results

2009-07-14 Thread jim holtman
FAQ 7.31 This is what happens with floating point number and you are only printing out 7 digits of precision; look at the results > cos(-1.570796) [1] 0.003267949 > cos(-1.5707961) # just incrementing the digit that was not displayed [1] 0.002267949 > cos(-1.5707962) [1] 0.001267949 >

Re: [R] Trig functions strange results

2009-07-14 Thread Ben Bolker
Nair, Murlidharan T wrote: > > I am trying to calculate coordinate transformations and in the process of > debugging my code using debug I found the following > > Browse[1]> direction[i] > [1] -1.570796 > Browse[1]> cos(direction[i]) > [1] 6.123032e-17 > Browse[1]> cos(-1.570796) > [1] 3.26794

Re: [R] Proper Paste for Data Member

2009-07-14 Thread David Winsemius
On Jul 14, 2009, at 2:02 PM, Idgarad wrote: I imported a spreadsheet into a variable sh e.g. sh$, sh$, etc... doing the following: tsSource <- ts(paste("sh$",NAMEVARIABLE,sep="") ... ) From prior experience, my guess is that you want collapse= rather than sep= fails. The past

[R] Proper Paste for Data Member

2009-07-14 Thread Idgarad
I imported a spreadsheet into a variable sh e.g. sh$, sh$, etc... doing the following: tsSource <- ts(paste("sh$",NAMEVARIABLE,sep="") ... ) fails. The paste isn't evaluating properly. What is the proper way to concatenate a data source with a member name such that they evaluate properl

Re: [R] plotting confidence intervals

2009-07-14 Thread Daniel Malter
Erin and all, I lavishly used the factor 2 for the confidence intervals. Of course this should be approximately 1.96 for the 95% CI under the assumption of normality. So just adjust the factor accordingly or according to your desired alpha level when you create the CI data frame. Otherwise, my exam

Re: [R] plotting confidence intervals

2009-07-14 Thread Daniel Malter
Hi Erin, have a look at the following example: #Simulate data n=1000 x1=rnorm(n,0,0.05) x2=rnorm(n,0,0.1) x3=rnorm(n,0,0.02) e=rnorm(n,0,1) y=x1+2*x2-0.5*x3+e #Run regression reg=lm(y~x1+x2+x3) #Regression output summary(reg)$coef #Create dataset with confidence intervals and an index CI=data.

[R] Trig functions strange results

2009-07-14 Thread Nair, Murlidharan T
I am trying to calculate coordinate transformations and in the process of debugging my code using debug I found the following Browse[1]> direction[i] [1] -1.570796 Browse[1]> cos(direction[i]) [1] 6.123032e-17 Browse[1]> cos(-1.570796) [1] 3.267949e-07 Browse[1]> direction[i] [1] -1.570796 Browse

Re: [R] hi, how can we avoid maskiing error in R

2009-07-14 Thread Charles C. Berry
On Tue, 14 Jul 2009, deepak m r wrote: Hi, How can we avoid masking variable in R Scripting. It really isn't clear what you are asking. Please follow the suggestions in the Posting Guide to frame a better question. Guessing what your issue might be, I suggest you consult ?confli

Re: [R] plotting confidence intervals

2009-07-14 Thread Marc Schwartz
On Jul 14, 2009, at 10:40 AM, Erin Hodgess wrote: Hi R People: If I have a fitted values from a model, how do I plot the (1-alpha)100% confidence intervals along with the fitted values, please? Also, if the intervals are "shaded" gray, that would be nice too, please? I check confint, but

Re: [R] From list to variable name

2009-07-14 Thread Gabor Grothendieck
Using the built in dataset anscombe this regresses y1 on x1 and y3 ignoring the other columns: lrm(y1 ~., anscombe[c("y1", "x1", "y3")]) or lrm(y1 ~., anscombe[c(5, 1, 7)]) either of which eliminate having to calculate special purpose formulas. Also see the leaps package. On Tue, Jul 14, 2009

Re: [R] Linear Regression Problem

2009-07-14 Thread Alex Roy
Dear Dr. Ravi Varadhan, Thanks for your comments. Here, variables (p) are in columns and samples are in rows(n). And I want to find out significant variables associated with response (y). The reason why I said multiple linear regression (MLR) is not possible : MLR or classical MLR developed with a

[R] From list to variable name

2009-07-14 Thread Michelle Greve
Hello I am trying to run equations with different combinations of explanatory variables. I have managed to figure out how to generate the different combinations, and am trying to set up equations where I use these combinations. And this is where I am getting stuck. I have searched several R web

Re: [R] exporting list of installed packages for import on another system?

2009-07-14 Thread Marc Schwartz
I'll leave that up to you... :-) You could add the URL of the thread to the wiki entry if you wish as well. Regards, Marc On Jul 14, 2009, at 10:57 AM, Jan Theodore Galkowski wrote: Super Marc! Thanks! Should I post this on the R Wiki some place? 'Twould be useful to others, I think.

Re: [R] exporting list of installed packages for import on another system?

2009-07-14 Thread Jan Theodore Galkowski
Super Marc! Thanks! Should I post this on the R Wiki some place? 'Twould be useful to others, I think. - Jan On Tue, 14 Jul 2009 11:49:49 -0400, Marc Schwartz wrote: On Jul 14, 2009, at 9:43 AM, Jan Theodore Galkowski wrote: Is it possible to export a list of installed packages from

Re: [R] exporting list of installed packages for import on another system?

2009-07-14 Thread Marc Schwartz
On Jul 14, 2009, at 9:43 AM, Jan Theodore Galkowski wrote: Is it possible to export a list of installed packages from WinXP, and use that export to import the same set of packages on Ubuntu (Jaunty)? No doubt there is custom code that could be written, but I wonder if R 2.9.1 has anything buil

Re: [R] Linear Regression Problem

2009-07-14 Thread Ravi Varadhan
I am not sure that you really want to do separate regressions for each row of X, with the same y. This does not make much sense. Why do you think multiple linear regression is not possible just because X'X is not invertible? You have 2 main options here: 1. Obtain a minimum-norm solution usi

Re: [R] Linear Regression Problem

2009-07-14 Thread Liaw, Andy
For the coefficient to be equal to the correlation, you need to scale y as well. You can get the correlations by something like the following and then back-calculate the coefficients from there. R> x = matrix(rnorm(100*4e4), 100, 4e4) R> y = rnorm(100) R> rxy = cor(x, cbind(y)) Andy > -Or

[R] plotting confidence intervals

2009-07-14 Thread Erin Hodgess
Hi R People: If I have a fitted values from a model, how do I plot the (1-alpha)100% confidence intervals along with the fitted values, please? Also, if the intervals are "shaded" gray, that would be nice too, please? I check confint, but that doesn't seem to do what I want. Thanks in advance,

Re: [R] Linear Regression Problem

2009-07-14 Thread Alex Roy
Dear Vito, Thanks for your comments. But I want to do Simple linear regression not Multiple Linear regression. Multiple Linear regression is not possible here as number of variables are much more than samples.( X is ill condioned, inverse of X^TX does not exist! ) I just want to tak

[R] hi, how can we avoid maskiing error in R

2009-07-14 Thread deepak m r
Hi, How can we avoid masking variable in R Scripting. best regards deepak __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide comment

[R] Runtime Error with multinom

2009-07-14 Thread Andreas Wittmann
Dear R-users, i try to fit a multinomial model in order to get an imputation for a missing value in factor1. library(nnet) factor1 <- factor(c("a","b","c","d")) factor2 <- factor(c("e","f","g","h")) size <- c(3,8,2,1) factor1[3] <- NA Z<-ifelse(is.na(factor1), 0, 1) assign("data", cbind.data

Re: [R] Linear Regression Problem

2009-07-14 Thread Vito Muggeo (UniPa)
dear Alex, I think your problem with a large number of predictors and a relatively small number of subjects may be faced via some regularization approach (ridge or lasso regression..) hope this helps you, vito Alex Roy ha scritto: Dear All, I have a matrix say, X ( 100 X 40

[R] paste (" " x " ")

2009-07-14 Thread Paulo E. Cardoso
maybe a very basic question but I need to parse an SQL code into a GIS from a ODBC conn. The code includes a specific sentence OPTIONS COORDSYS("Latitude / Longitude"); and I need the " " pasted into the string. They cannot disappear. how to do this? Paulo E. Cardoso

[R] Linear Regression Problem

2009-07-14 Thread Alex Roy
Dear All, I have a matrix say, X ( 100 X 40,000) and a vector say, y (100 X 1) . I want to perform linear regression. I have scaled X matrix by using scale () to get mean zero and s.d 1 . But still I get very high values of regression coefficients. If I scale X matrix, then the

[R] Problem with GroupedData

2009-07-14 Thread FMH
Hi,   I have an original data frame with 8 columns of variables, which are stored in 'data1' frame.   data1 <- read.csv("E:\\PHD GLASGOW UNIVERSITY\\Data\\R\\Colin\\Cailness21.csv") attach(data1) names(data1)   [1] "Date"   "d"  "m"  "y"  "Time"  [6] "Depth"  "

[R] Error when sampling from SpatialLines

2009-07-14 Thread Elke MOONS
Dear forum,   I am working in R 2.9.1 and I am trying to sample locations from a network file. Reading in nor plotting is a problem, however when I am trying to sample from the file I get the following message:   nwlim<-readShapeLines("C:/Limburg_nwshape", proj4string=CRS("+init=epsg:31

[R] exporting list of installed packages for import on another system?

2009-07-14 Thread Jan Theodore Galkowski
Is it possible to export a list of installed packages from WinXP, and use that export to import the same set of packages on Ubuntu (Jaunty)? No doubt there is custom code that could be written, but I wonder if R 2.9.1 has anything built it to do that? Is it as simple as moving something like Rpro

Re: [R] hi friends, is there any wait function in R

2009-07-14 Thread deepak m r
hi, first plot command and legend commands are working but lines command is not working i dont know how it happening so. can u please help. best regards deepak On Tue, Jul 14, 2009 at 10:32 AM, Duncan Murdoch wrote: > On 7/14/2009 10:07 AM, deepak m r wrote: >> >> Hi, >>   I am not an expert to

Re: [R] hi friends, is there any wait function in R

2009-07-14 Thread Duncan Murdoch
On 7/14/2009 10:07 AM, deepak m r wrote: Hi, I am not an expert to debug the R can u please help. No, because you haven't given us anything to work with. Simplify your example to something we can run, explain what you see and what you think you should see, and then maybe one of us could h

Re: [R] Fortran function for quantiles

2009-07-14 Thread roger koenker
You could look at the function kuantile() in the package quantreg and the associated fortran code dsel05.f which implements a version of the Floyd and Rivest (CACM, 1975) algorithm. url:www.econ.uiuc.edu/~rogerRoger Koenker emailrkoen...@uiuc.eduDepartment of Econ

Re: [R] LAPACK package

2009-07-14 Thread Steve Lianoglou
Hi, On Jul 14, 2009, at 5:45 AM, Moumita Das wrote: Hi All, Can someone tell me if solve function shown below for my version of R is proper or not? I am using R 2.7.2 .Wherever i have used this function ,i got results which were different from the expected results as computed using SPSS

Re: [R] Help needed in identifying type of plot

2009-07-14 Thread John Kane
It looks like a forest plot normally used in meta-analysis work. See http://www.bmj.com/cgi/content/full/322/7300/1479 . See http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=114 for an example from rmeta package with accompanying code. I think that package metafor also gives fore

[R] Tinn-R 2.3.0.0 released

2009-07-14 Thread Jose Claudio Faria
We would like to announce that a new version of the Tinn-R for Windows (2.3.0.0) was released and is available on SourceForge server: http://sourceforge.net/projects/tinn-r Tinn-R is a R script editor under the OS Windows. Changes: 2.3.0.0 (jul/10/2009) * Bugs fixed: - The error mes

Re: [R] hi friends, is there any wait function in R

2009-07-14 Thread deepak m r
Hi, On Tue, Jul 14, 2009 at 9:38 AM, Duncan Murdoch wrote: > On 7/14/2009 8:56 AM, deepak m r wrote: >> >> Hi, >>    Empty plot is getting i dont know why. can u please clarify how >> can i use Print function instead of plot function. > > You need print() if you are using grid-based graphics (lat

Re: [R] hi friends, is there any wait function in R

2009-07-14 Thread deepak m r
Hi, I am not an expert to debug the R can u please help. best regards deepak On Tue, Jul 14, 2009 at 10:06 AM, deepak m r wrote: > Hi, > > > On Tue, Jul 14, 2009 at 9:38 AM, Duncan Murdoch wrote: >> On 7/14/2009 8:56 AM, deepak m r wrote: >>> >>> Hi, >>>    Empty plot is getting i dont know why

[R] LondonR meeting - 21st of July

2009-07-14 Thread Francisco Gochez
Thank you to everyone for showing such an interest in the next LondonR meeting. Below is the agenda for the meeting: LondonR meeting - 21st July 2009 Time:4pm - 7pm Venue: The Wall 45 Old Broad Street London

[R] Attributes lost after 'merge'

2009-07-14 Thread Frank Bloos
Hi, In my dataframes, I am using attributes such as 'units' and 'labels' from the Hmisc-package. However, when I join two dataframes with the merge-command, all these attributes are gone. Is there a way to preserve them? Thanks, Frank Universitätsklinikum Jena Körperschaft d

Re: [R] hi friends, is there any wait function in R

2009-07-14 Thread Duncan Murdoch
On 7/14/2009 8:56 AM, deepak m r wrote: Hi, Empty plot is getting i dont know why. can u please clarify how can i use Print function instead of plot function. You need print() if you are using grid-based graphics (lattice, ggplot2,...) in a script. You are using classic graphics so it sho

Re: [R] 2 x 2 x 10 x 2 binomial setup

2009-07-14 Thread Marc Schwartz
On Jul 14, 2009, at 8:09 AM, Suresh Krishna wrote: Hello, I have a hierarchical dataset of this form and am trying to analyze it in R. 1 subject Tested under 2 conditions: A and B 10 sesssions in each condition In each session, 2 kinds of tests: Test 1 and Test 2 200 independent repetitio

Re: [R] Nested for loops

2009-07-14 Thread Michael Knudsen
On Tue, Jul 14, 2009 at 2:29 PM, Gabor Grothendieck wrote: > seq. <- function(from, to) seq(from = from, length = max(0, to - from + 1)) Really nice! Thank you! -- Michael Knudsen micknud...@gmail.com http://lifeofknudsen.blogspot.com/ __ R-help@r-pr

Re: [R] Nested for loops

2009-07-14 Thread Michael Knudsen
On Tue, Jul 14, 2009 at 1:56 PM, David Winsemius wrote: >> temp[ upper.tri(temp) ] >  [1]  7 13 14 19 20 21 25 26 27 28 31 32 33 34 35 Thanks! I didn't know about that function; it certainly makes things a lot easier. For example, until now I have used the following, homemade expression (1:N^2)[

[R] 2 x 2 x 10 x 2 binomial setup

2009-07-14 Thread Suresh Krishna
Hello, I have a hierarchical dataset of this form and am trying to analyze it in R. 1 subject Tested under 2 conditions: A and B 10 sesssions in each condition In each session, 2 kinds of tests: Test 1 and Test 2 200 independent repetitions of each test-type, with 200 Yes/No answers So I th

Re: [R] nls - find good starting values

2009-07-14 Thread Antje
Hi Bill, thanks for your answer. I don't see what you mean with "fitting a gaussian distribution"... I'm pretty sure, that I'd like to fit a gaussian probability density function :-) (not normalized, for example with a mean around -4 and a standard deviation of 0.5) I'm not sure if I understa

Re: [R] How to provide list as an argument for the data.frame()

2009-07-14 Thread Marc Schwartz
On Jul 14, 2009, at 7:14 AM, Gaurav Kumar wrote: Hi R -users, i've a table as describe below. I'm reading the numeric value presented in this table to populate a list. #table # #XABC #x1234 #x25710 #x4235 # rawData <-

Re: [R] hi friends, is there any wait function in R

2009-07-14 Thread deepak m r
Hi, where can i use this par(ask=TRUE) function i tried before dev.off() code but it is again the same. best regards, Deepak On Tue, Jul 14, 2009 at 8:56 AM, deepak m r wrote: > Hi, >    Empty plot is getting i dont know why. can u please clarify how > can i use Print function instead of plot fu

Re: [R] hi friends, is there any wait function in R

2009-07-14 Thread deepak m r
Hi, Empty plot is getting i dont know why. can u please clarify how can i use Print function instead of plot function. best regards deepak On Tue, Jul 14, 2009 at 7:48 AM, Petr PIKAL wrote: > Hi > > For this type of problems I do multipage pdf. > > pdf("file", ) > for (i in ...) { > do all

Re: [R] How to provide list as an argument for the data.frame()

2009-07-14 Thread David Winsemius
On Jul 14, 2009, at 8:14 AM, Gaurav Kumar wrote: Hi R -users, i've a table as describe below. I'm reading the numeric value presented in this table to populate a list. #table # #XABC #x1234 #x25710 #x4235 # rawData <-

Re: [R] Nested for loops

2009-07-14 Thread Gabor Grothendieck
Try this: seq. <- function(from, to) seq(from = from, length = max(0, to - from + 1)) seq.(11, 10) On Tue, Jul 14, 2009 at 1:38 AM, Michael Knudsen wrote: > Hi, > > I have spent some time locating a quite subtle (at least in my > opinion) bug in my code. I want two nested for loops traversing

  1   2   >