[R] help:Vector vs array

2009-08-04 Thread chalie epps
Greetings R-help community, I am relatively new to R, which may be why I am having trouble understanding this problem. I want to know the differences between vector and array. could someone tell me something about this question. Thanks in advance, __ R

Re: [R] min frequencies of categorical predictor variables in GLM

2009-08-04 Thread Thomas Mang
Marc Schwartz wrote: On Aug 3, 2009, at 12:06 AM, Thomas Mang wrote: Hi, Suppose a binomial GLM with both continuous as well as categorical predictors (sometimes referred to as GLM-ANCOVA, if I remember correctly). For the categorical predictors = indicator variables, is then there a sugges

[R] get NA from outlier{randomForest}

2009-08-04 Thread Weiwei Shi
Hi I have a data frame like this: V1V2 V3 V4 Min. :0.01146 Min. :0.0006714 Min. :0.004912 Min. : 0 1st Qu.:0.03938 1st Qu.:0.0072805 1st Qu.:0.052719 1st Qu.:1150 Median :0.04224 Median :0.0077581 Median :0.056388

Re: [R] regex question

2009-08-04 Thread Michael Erickson
Here's what I came up with: > gsub("(\\w)[^ ]+[\\b ]", "\\1", astr) [1] "Timtowtdit" You might be interested in Regular Expressions Cookbook from O'Reilly (publisher not author) or http://www.regular-expressions.info/ I usually bumble along knowing there are better ways to do whatever I am doing

[R] stepwise

2009-08-04 Thread Luciana Melina Pozzi
Dear R members, I would like to know if there is a stepwise function that gives LRT value instaed of AIC? thanks in advance, Luciana Pozzi CENPAT-CONICET Argentina [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https:

Re: [R] Stacked plots with common x-axis and different y-axis

2009-08-04 Thread Jason Rupert
time <- seq(0,72,12) betagal.abs <- c(0.05,0.18,0.25,0.31,0.32,0.34,0.35) cell.density <- c(0,1000,2000,3000,4000,5000,6000) #add extra space to right margin of plot within frame par(mar=c(5, 4, 4, 4) + 0.1) # Plot first set of data and draw its axis plot(time, betagal.abs, pch=16, axes=F, yli

[R] Counting things

2009-08-04 Thread Noah Silverman
I've completed an experiment and want to summarize the results. There are two things I like to create. 1) A simple count of things from the data.frame with predictions 1a) Number of predictions with probability greater than x 1b) Number of predictions with probability greater than x that

[R] labeling in qplot

2009-08-04 Thread Mohan S
HI am plotting different density plots in one graph each with a different color. And i want to add labels to plot mentioning which color belongs to which data series. p2 <- qplot(corArms, data = data1, geom = "density", adjust=0.4, main="Arms Correlation All") + layer(data=data2, geom="densi

Re: [R] lme funcion in R

2009-08-04 Thread Hongwei Dong
Hi, the problem has been solved by using "lmer" rather than the "lme" function. It seems the "lme" function dislike my large data size. "lmer" function deals with large data size much better. Thanks for the replies above. Harry On Tue, Aug 4, 2009 at 7:11 PM, David Winsemius wrote: > > On Aug

Re: [R] array slice notation?

2009-08-04 Thread Steve Jaffe
Very nice. Two questions: 1> Do you have any idea of the timing difference, if any, between this and the vector-subscripting method? 2> How do you generalize this to select multiple rows eg with indexes given by a vector 'v'? Søren Højsgaard wrote: > > You can do >> A <- HairEyeColor >> do.ca

Re: [R] lme funcion in R

2009-08-04 Thread David Winsemius
On Aug 4, 2009, at 9:06 PM, Hongwei Dong wrote: > Thanks, David, you are right. If I use continuous data such as 1, > 2, ...6 to represent those 6 housing types, the model works with the > lme function in R. The problem is, the relationship between the 6 > housing types are not continuous,

Re: [R] Error in elastic net

2009-08-04 Thread Steve Lianoglou
Ram, Did my email from earlier today not help? http://article.gmane.org/gmane.comp.lang.r.general/158431 -steve On Aug 4, 2009, at 6:22 PM, ram basnet wrote: Dear R users, I am new user for elastic net. I am trying to use elasticnet library. I have marker data with 359 markers and 168 sa

[R] Random numbers of multivariate power exponential distribution!

2009-08-04 Thread jeremias leao
Dear, R help How can I generate random numbers of the multivariate power exponential distribution. Regards, Jeremias Leão. [[elided Yahoo spam]] [[alternative HTML version deleted]] _

Re: [R] fitting a truncated power law

2009-08-04 Thread glen_b
Let me rephrase. You have some counts. You have some other measurement or measurements. Presumably you are trying to predict (fit) expected count in terms of the measurements. Can you identify which variable is the count and how your model describes the expected count? Glen glen_b wrote: > >

Re: [R] fitting a truncated power law

2009-08-04 Thread glen_b
Hang on, now I'm very confused. What is the information you have collected? Is it x and y? k and x? which one is the count? John Sanders-2 wrote: > > The function I'm trying to fit has the form: > > P(k) > ~ k^(-y) exp (– k ⁄ kx) > > And deals with count data. I'm a newbie, so any more spe

Re: [R] lme funcion in R

2009-08-04 Thread Hongwei Dong
In addition, it seems the lme function in R are very troubled with the dummy variables used at the first (random) level. Harry On Tue, Aug 4, 2009 at 6:06 PM, Hongwei Dong wrote: > Thanks, David, you are right. If I use continuous data such as 1, 2, ...6 > to represent those 6 housing types, th

Re: [R] lme funcion in R

2009-08-04 Thread Hongwei Dong
Thanks, David, you are right. If I use continuous data such as 1, 2, ...6 to represent those 6 housing types, the model works with the lme function in R. The problem is, the relationship between the 6 housing types are not continuous, which we assume when we use 1,2,..6 to represent them. Harry O

Re: [R] lme funcion in R

2009-08-04 Thread David Winsemius
On Aug 4, 2009, at 8:47 PM, David Winsemius wrote: On Aug 4, 2009, at 7:48 PM, Hongwei Dong wrote: Yeah, I have a very large sample size, about 60,000 observations. Multicollinearity should not be a problem here. The weird thing is that SPSS can converge very quickly and gives out reasona

Re: [R] lme funcion in R

2009-08-04 Thread David Winsemius
On Aug 4, 2009, at 7:48 PM, Hongwei Dong wrote: Yeah, I have a very large sample size, about 60,000 observations. Multicollinearity should not be a problem here. The weird thing is that SPSS can converge very quickly and gives out reasonable results. The only problem I can think of is that,

[R] step by step tutorial to beginning of R programming by Emacs+ESS on MS Windows

2009-08-04 Thread Mao Jianfeng
Dear R-listers, I am now asking for step by step tutorial to beginning of R programming by Emacs+ESS on MS Windows. Though it was appreciated highly, there is much troubles we must conquered before we set up R programming by Emacs+ESS, especially for users of MS Windows and who without extensive

Re: [R] regex question

2009-08-04 Thread Chuck Taylor
Ravi, Here is a third way to do this, but it doesn't make use of regular expressions per se: > avec <- unlist(strsplit(astr, "")) # First convert astr to a vector > avec[c(1, 1 + grep(" ", avec))] [1] "T" "i" "m" "t" "o" "w" "t" "d" "i" This latter expression subscripts avec by concatenating t

Re: [R] Build a dataframe row by row?

2009-08-04 Thread Remko Duursma
> Nice, but I need a few columns for the data.  Don't know how to do this with > the method you suggest. For each iteration, you make a vector of your 'data', in the example it is a vector of length 3. Each of the elements in this vector will become a column in the dataframe. If that is not what

Re: [R] Build a dataframe row by row?

2009-08-04 Thread Noah Silverman
Hi, Nice, but I need a few columns for the data. Don't know how to do this with the method you suggest. -N On 8/4/09 4:57 PM, Remko Duursma wrote: Hi Noah, there are a few ways to do this. Easiest is to keep adding an element to a list, and then make it into a dataframe at the end, like th

Re: [R] Build a dataframe row by row?

2009-08-04 Thread Remko Duursma
Hi Noah, there are a few ways to do this. Easiest is to keep adding an element to a list, and then make it into a dataframe at the end, like this: resultlis <- list() for(i in 1:10){ # your calculations here datavec <- runif(3) resultlis[[i]] <- datavec } resultdfr <- as.data.frame(do.call("rb

Re: [R] lme funcion in R

2009-08-04 Thread Hongwei Dong
Yeah, I have a very large sample size, about 60,000 observations. Multicollinearity should not be a problem here. The weird thing is that SPSS can converge very quickly and gives out reasonable results. The only problem I can think of is that, my first level (random) variables are dummy variables:

[R] Build a dataframe row by row?

2009-08-04 Thread Noah Silverman
Hi, Time for another of my "newbie" questions. Is it possible to build up a data.frame "row by row" as I go I'm going to be running a bunch of experiments (many in a loop) to test different things. I'm using AUC as my main performance measure. My thought was to add a row to a data.frame for

Re: [R] Scale set of 0 values returns NAN??

2009-08-04 Thread Noah Silverman
LOL, I'll happily support that. Can we possibly take my name off of it? :) -N On 8/4/09 4:31 PM, Rolf Turner wrote: On 5/08/2009, at 11:10 AM, Greg Snow wrote: -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Noah Silverma

Re: [R] Scale set of 0 values returns NAN??

2009-08-04 Thread Rolf Turner
On 5/08/2009, at 11:10 AM, Greg Snow wrote: -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Noah Silverman Sent: Monday, August 03, 2009 12:26 AM To: r help Subject: [R] Scale set of 0 values returns NAN?? [snip] Using R is

Re: [R] Scale set of 0 values returns NAN??

2009-08-04 Thread Greg Snow
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Noah Silverman > Sent: Monday, August 03, 2009 12:26 AM > To: r help > Subject: [R] Scale set of 0 values returns NAN?? [snip] > Using R is forcing me > to take a much deeper l

Re: [R] Logistic Regression

2009-08-04 Thread Noah Silverman
Thanks David, My apologies for the HTML e-mail. Its the default of my desktop client. -N On 8/4/09 4:03 PM, David Winsemius wrote: On Aug 4, 2009, at 6:52 PM, Noah Silverman wrote: Hmmm.. I'll try that. I recall reading somewhere that the "group" variable had to be indicated in a specia

Re: [R] Logistic Regression

2009-08-04 Thread David Winsemius
On Aug 4, 2009, at 6:52 PM, Noah Silverman wrote: Hmmm.. I'll try that. I recall reading somewhere that the "group" variable had to be indicated in a special way. I use lrm and cph all the time ... thank you, Frank Harrell and I can assure you that a factor variable or one that h

Re: [R] Logistic Regression

2009-08-04 Thread Noah Silverman
Hmmm.. I'll try that. I recall reading somewhere that the "group" variable had to be indicated in a special way. -N On 8/4/09 3:49 PM, David Winsemius wrote: > > On Aug 4, 2009, at 6:45 PM, Noah Silverman wrote: > >> I guess I didn't explain it well enough. >> >> I have a number of training ex

Re: [R] Re ferencing columns and pulling selected data

2009-08-04 Thread milton ruser
Hi there, It may not be so ellegant, but you can try: PrsnData<-data.frame(cbind(PrsnSerialno,PrsnAge,IsHead)) PrsnData.subset<-subset(PrsnData, PrsnSerialno %in% HhSerialno) PrsnData.subset PrsnData.subset.maxage<-aggregate(PrsnData.subset["PrsnAge"], list(PrsnData.subset$PrsnSerialno), max) Pr

Re: [R] Logistic Regression

2009-08-04 Thread David Winsemius
On Aug 4, 2009, at 6:45 PM, Noah Silverman wrote: > I guess I didn't explain it well enough. > > I have a number of training examples. They have 4 fields. > label, v1, v2, group > > The label is binary ("yes", "no") > > My understanding (Quite possible wrong.) was that there was a way > to tr

Re: [R] Logistic Regression

2009-08-04 Thread Noah Silverman
I guess I didn't explain it well enough. I have a number of training examples. They have 4 fields. label, v1, v2, group The label is binary ("yes", "no") My understanding (Quite possible wrong.) was that there was a way to train the LR to estimate probabilities "per group" In pseudo-code it

Re: [R] Logistic Regression

2009-08-04 Thread David Winsemius
On Aug 4, 2009, at 6:38 PM, Noah Silverman wrote: > Thanks David, > > But HOW do I indicate the "grouping" variable in the formula? Hard to tell. You have told us absolutely nothing about the problem. Discrete variables cause no problems in formulas. Perhaps one of : ?factor ?cut ?quantile >

Re: [R] Logistic Regression

2009-08-04 Thread Noah Silverman
Thanks David, But HOW do I indicate the "grouping" variable in the formula? Thanks! -N On 8/4/09 3:37 PM, David Winsemius wrote: > > On Aug 4, 2009, at 6:33 PM, Noah Silverman wrote: > >> Hi, >> >> Trying to setup a logistic regression model. (Something new to me. I >> usually use SVM.) >> >>

Re: [R] Logistic Regression

2009-08-04 Thread David Winsemius
On Aug 4, 2009, at 6:33 PM, Noah Silverman wrote: Hi, Trying to setup a logistic regression model. (Something new to me. I usually use SVM.) The person explaining the concept explained to me that I can include a "group" variable so that the probabilities predicted by the model will be "per g

[R] Logistic Regression

2009-08-04 Thread Noah Silverman
Hi, Trying to setup a logistic regression model. (Something new to me. I usually use SVM.) The person explaining the concept explained to me that I can include a "group" variable so that the probabilities predicted by the model will be "per group" Does this make sense to anyone? If so, how

[R] Error in elastic net

2009-08-04 Thread ram basnet
Dear R users,   I am new user for elastic net. I am trying to use elasticnet library. I have marker data with 359 markers and 168 samples, and response is metabolites. I am trying to do regression between a metabolite and markers.  But i am getting the following error:   > en<-enet(marker

Re: [R] problem with pattern matching

2009-08-04 Thread David Winsemius
On Aug 4, 2009, at 11:16 AM, Rnewbie wrote: dear all, I got a problem with pattern matching using grep. I extracted a list of characters from a data frame, and I tried to match this list of characters to a column from another data frame. In return, I got only one match, but there shoul

Re: [R] "na.strings" and the like; suspending interpretation of "NA"

2009-08-04 Thread Jan Theodore Galkowski
The magic I was looking for is to pass "as.is=TRUE" to "sqlQuery" of RODBC. The reference to "read.table" is a little oblique, but with that, all works fine. An education! :-) Thanks much, Jan On Tue, 04 Aug 2009 09:05:05 +0200, "Peter Dalgaard" said: > Jan Theodore Galkowski wrote: > >

Re: [R] read.csv from a remote machine

2009-08-04 Thread Mark Wardle
I would use sshfs or an alternatively remote file system access. Ssh to your Linux box and then mount the mac os x filesystem via sshfs, or afs for example. Alternatively, can't you copy the data to the Linux box using sftp first? -- Dr. Mark Wardle Specialist registrar, Neurology (Sent fro

[R] RODBC package to connect to Oracle database Linux

2009-08-04 Thread Luis Ridao Cruz
R-help, I get the following error message when trying to connect to an Oracle database through R (2.8.1) under Linux (Ubuntu 9.04). > channel<-odbcConnect("magnus",uid="luisr",pwd="juanayzakarias") Warning messages: 1: In odbcDriverConnect(st, ...) : [RODBC] ERROR: state IM002, code 0, message

[R] Oracle ODBC driver for Linux

2009-08-04 Thread Luis Ridao Cruz
R-help, I get the following error message when trying to connect to an Oracle database through R (2.8.1) under Linux (Ubuntu 9.04). > channel<-odbcConnect("magnus",uid="luisr",pwd="juanayzakarias") Warning messages: 1: In odbcDriverConnect(st, ...) : [RODBC] ERROR: state IM002, code 0, message

[R] problem with pattern matching

2009-08-04 Thread Rnewbie
dear all, I got a problem with pattern matching using grep. I extracted a list of characters from a data frame, and I tried to match this list of characters to a column from another data frame. In return, I got only one match, but there should be far more matches. Any ideas what has gone wrong?

[R] Wakeby Curve

2009-08-04 Thread amna khan
Hi Sir How to get Wakeby distribution curve on L-moment ratio diagram? Regards -- AMINA SHAHZADI Department of Statistics GC University Lahore, Pakistan. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.e

[R] Re ferencing columns and pulling selected data

2009-08-04 Thread PDXRugger
Please consider the following inputs: PrsnSerialno<-c(735,1147,2019,4131,4131,4217,4629,4822,4822,5979,5979,6128,6128,7004,7004, 7004,7004,7004,7438,7438,9402,9402,9402,10115,10115,11605,12693,12693,12693) PrsnAge<-c(59,48,42,24,24,89,60,43,47,57,56,76,76,66,70,14,7,3,62,62,30,10,7,20,21,50,53,44

Re: [R] graph data mining

2009-08-04 Thread Steve Lianoglou
Hi, On Aug 3, 2009, at 10:37 PM, Weiwei Shi wrote: Hi I am wondering if R or some others provide free-to-use graph mining tools, like mining some frequent structure in a x-y plot data? It sounds like you're looking for a library does frequent subgraph mining across a graph dataset. I'm

[R] Stacked plots with common x-axis and different y-axis

2009-08-04 Thread Jason Rupert
Is there a place that shows how to create two plots that are stacked on top of each other where they share a common x-axis scale, but have differnt y-axis scale? Say have the following data: airquality Stack plot(airquality$Day, airquality$Wind) on top of plot(airquality$Day, airquality$Temp).

Re: [R] array slice notation?

2009-08-04 Thread Jim Lemon
Hi Steve, I had the same problem when writing the hierobarp function in plotrix. Have a look at the source code (v2.6-4 in my copy lines 128-133) as the solution seems to work well. Jim __ R-help@r-project.org mailing list https://stat.ethz.ch/mailm

Re: [R] Variable names as inputs...

2009-08-04 Thread Horacio Samaniego
That is exactly what I needed! I dunno why I did not think about it earlier duuhhh!!! thanks very much!!! sapply(modelos, AIC) did the job! more specifically, (I wanted a dataframe to make comparaisons easy) k=as.data.frame(sapply(modelos,AIC)) df_results=cbind(k,modelo=rownames(k)) So,

Re: [R] session logging

2009-08-04 Thread Jacob Wegelin
Thanks. This seems to mirror the output *both* to the console *and* to the sink file. The error messages, on the other hand, show up only in the console. On Tue, Aug 4, 2009 at 3:24 PM, Allan Engelhardt wrote: > sink(..., type=c("output","message"), split=TRUE) at the beginning of your > session

Re: [R] array slice notation?

2009-08-04 Thread Steve Jaffe
correction -- that would work for a single row, if you want the result to be an array with one fewer dimensions. But in general you get an array of the same dimension you started with (where the first dimension may be length 1). So: dim(slice) <- c(length(v), dim(arr)[-1]) Although you *do* hav

Re: [R] array slice notation?

2009-08-04 Thread Søren Højsgaard
You can do > A <- HairEyeColor > do.call("[", c(list(A),list(1,T,T))) Sex Eye Male Female Brown 32 36 Blue11 9 Hazel 10 5 Green3 2 Regards Søren Fra: r-help-boun...@r-project.org [r-help-boun...@r-project.

Re: [R] array slice notation?

2009-08-04 Thread Steve Jaffe
Although you *do* have to re-assign the dimensions, otherwise the result is just a flat vector, ie slice <- A[ outer(v, dim(A)[1]*( 1:prod(dim(A)[-1])-1 ), '+') ] dim(slice) <- dim(A)[-1] Steve Jaffe wrote: > > A[ outer(v, dim(A)[1]*( 1:prod(dim(A)[-1])-1 ), '+') ] > -- View this message i

Re: [R] Completion for custom "$" operator?

2009-08-04 Thread Deepayan Sarkar
On Tue, Aug 4, 2009 at 11:37 AM, Vitalie S. wrote: > Dear UseRs, > > I declared a `$` method for a S4 class. Can I have ab automatic completion > for this operator in R? Lists and environment objects provide this feature > by default, but my object is an extension of "function" class which does not

Re: [R] array slice notation?

2009-08-04 Thread Steve Jaffe
Yes, I was thinking more in terms of mental operations than physical. I think the following works, but it doesn't seem entirely transparent :-) Given array A, and a vector of row indices v (ie 1 <= v <= dim(A)[1]), the slice of rows v is A[ outer(v, dim(A)[1]*( 1:prod(dim(A)[-1])-1 ), '+') ]

Re: [R] scatterplot3d bug??

2009-08-04 Thread Uwe Ligges
Will take a look when back from holidays in 2 weeks. Uwe David Winsemius wrote: Not sure you can call it a bug when the help page says for angles in range (180, 360) that some support functions may "not work properly". On Aug 3, 2009, at 2:12 PM, Vivek Ayer wrote: Hey guys, Not sure if

Re: [R] array slice notation?

2009-08-04 Thread Steve Lianoglou
Hi, On Aug 4, 2009, at 3:23 PM, Steve Jaffe wrote: Suppose I have an n-diml array A and I want to extract the first "row" -- ie all elements A[1, ...] Interactively if I know 'n' I can write A[1,] with (n-1) commas. How do I do the same more generally, eg in a script? (I can think of

Re: [R] session logging

2009-08-04 Thread Allan Engelhardt
sink(..., type=c("output","message"), split=TRUE) at the beginning of your session should do it? Jacob Wegelin wrote: Consider all the text that one sees on the console during an R session. Is there a way, within R, to make all this text--both the "output" and the "messages"--automatically g

[R] array slice notation?

2009-08-04 Thread Steve Jaffe
Suppose I have an n-diml array A and I want to extract the first "row" -- ie all elements A[1, ...] Interactively if I know 'n' I can write A[1,] with (n-1) commas. How do I do the same more generally, eg in a script? (I can think of doing this by converting A to a vector then extracting t

[R] ggplot2 course: 19 October, Austin TX / the web

2009-08-04 Thread Hadley Wickham
Hi all, On October 19, I'll be offering a one data ggplot2 course in conjunction with the ISMI Manufacturing Week. The course is open to all and you can attend in person (Austin TX) or over the web. More information available from http://lookingatdata.com/ismi-2009/ Regards, Hadley -- http://

Re: [R] Strange error with ROCR

2009-08-04 Thread Noah Silverman
I hadn't thought of that. I'll run some tests... -N On 8/4/09 11:49 AM, Tobias Sing wrote: >> Is the "probability of the true label" the best prediction to feed to >> the ROCR package, or is it better to use the "decision.value" >> > Since AFAIK they are related by a monotonous transforma

Re: [R] Strange error with ROCR

2009-08-04 Thread Tobias Sing
> Is the "probability of the true label" the best prediction to feed to > the ROCR package, or is it better to use the "decision.value" Since AFAIK they are related by a monotonous transformation, both approaches should lead to the same ROC curve, shouldn't they? (not tested) On Tue, Aug 4, 2009

[R] Completion for custom "$" operator?

2009-08-04 Thread Vitalie S.
Dear UseRs, I declared a `$` method for a S4 class. Can I have ab automatic completion for this operator in R? Lists and environment objects provide this feature by default, but my object is an extension of "function" class which does not have subseting defined. How to be? Thanks for any

[R] Sweave, cm-lgc and minus signs

2009-08-04 Thread Bert Stumm
Hello, since a couple of days I'm trying hard to elicit a certain thing out of the Sweave function of R. Unfortunately I'm quite unsuccessful. It's only about a small, ridiculous minus sign, which does not appear in the final pdf of a latex file, if I try to incorporate the Computer- Modern fonts

Re: [R] R's database capabilities

2009-08-04 Thread David Winsemius
On Aug 4, 2009, at 2:04 PM, Jim Bouldin wrote: I admit that I've not done a thorough search on this topic, but from the several instructional manuals and/or tutorials I've looked at, I don't see any mention of relational database capabilities in R? Have I missed something, and if so, c

Re: [R] Strange error with ROCR

2009-08-04 Thread Noah Silverman
Good point. I'm not sure how I missed that. This does lead to an additional question: Is the "probability of the true label" the best prediction to feed to the ROCR package, or is it better to use the "decision.value" Anybody have any experience on this one? Thanks! -N On 8/4/09 3:28 AM, Ch

[R] Caculate first difference from a dataframe; write a simulation

2009-08-04 Thread Meenu Sahi
Dear R Users I'm writing my first simulation in R. I've put across my problems with a smaller example in the attachment along with the questions. Please help. Best regards Meenu mydat<-read.table(textConnection("Level spread change State 4.57 1.6 BlF NA 4.45 2.04 BrS NA 3.07 2.49 BlS NA 3.26 -0

Re: [R] R's database capabilities

2009-08-04 Thread Romain Francois
Hi, Did your search include this : R> RSiteSearch( "database" ) Romain On 08/04/2009 08:04 PM, Jim Bouldin wrote: I admit that I've not done a thorough search on this topic, but from the several instructional manuals and/or tutorials I've looked at, I don't see any mention of relational data

[R] R's database capabilities

2009-08-04 Thread Jim Bouldin
I admit that I've not done a thorough search on this topic, but from the several instructional manuals and/or tutorials I've looked at, I don't see any mention of relational database capabilities in R? Have I missed something, and if so, can someone point me in the right direction to get started

Re: [R] read.csv from a remote machine

2009-08-04 Thread Olga Lyashevska
Thanks Barry and Steve, I am trying to import data with read.csv and my file is on remote machine. I believe that I need to open a connection, not sure about syntax though. Probably works with ftp: too. How remote is it? In fact it is a bit more complicated. I am working on a Mac machine,

Re: [R] regex question

2009-08-04 Thread Gabor Grothendieck
And here is a second way: > strapply(astr, "(\\w)\\w+", c, simplify = c) [1] "T" "i" "m" "t" "o" "w" "t" "d" "i" "i" "t" "f" "f" "T" On Tue, Aug 4, 2009 at 1:42 PM, Gabor Grothendieck wrote: > Try this: > >> library(gsubfn) >> strapply(astr, "\\w+", ~ substr(x, 1, 1), simplify = c) >  [1] "T" "

Re: [R] regex question

2009-08-04 Thread Gabor Grothendieck
Try this: > library(gsubfn) > strapply(astr, "\\w+", ~ substr(x, 1, 1), simplify = c) [1] "T" "i" "m" "t" "o" "w" "t" "d" "i" "i" "t" "f" "f" "T" On Tue, Aug 4, 2009 at 1:28 PM, ravi wrote: > > Hi, > I am getting stuck over an apparently simple problem in the use of regular > expressions : > T

Re: [R] fitted.values less than observed values

2009-08-04 Thread Federico Calboli
On 4 Aug 2009, at 18:27, David Winsemius wrote: Your first posting made me think that you were complaining that the fitted values were less than the raw values. Your second posting makes me think that you may be conflating the English word "less" with the word English "fewer". Many native speak

Re: [R] fitted.values less than observed values

2009-08-04 Thread Federico Calboli
On 4 Aug 2009, at 18:27, David Winsemius wrote: Your first posting made me think that you were complaining that the fitted values were less than the raw values. Your second posting makes me think that you may be conflating the English word "less" with the word English "fewer". Many native speak

[R] regex question

2009-08-04 Thread ravi
Hi, I am getting stuck over an apparently simple problem in the use of regular expressions : To collect together the first letters of the words from the Perl motto, “There is more than one way to do it” in the following form – TIMTOWTDI. I tried the following code :   # A regex problem with

Re: [R] fitted.values less than observed values

2009-08-04 Thread David Winsemius
Your first posting made me think that you were complaining that the fitted values were less than the raw values. Your second posting makes me think that you may be conflating the English word "less" with the word English "fewer". Many native speakers make the same error, but in this contex

[R] Revolutions blog: July Roundup

2009-08-04 Thread David M Smith
I write about R every weekday at the Revolutions blog: http://blog.revolution-computing.com In case you missed them, here are some articles from last month of particular interest to R users. http://bit.ly/2HPlOe announced a directory of R user groups available on the Revolutions blog. http://bit

Re: [R] RServe - How to use 'createReference' method?

2009-08-04 Thread Romain Francois
Hi, I've done a more complete response in my blog. http://tr.im/vshK Romain On 08/04/2009 06:10 PM, Romain Francois wrote: Hi, So the file you want to read is on the client machine, and you want to transfer it to the server and read it into R ? What I guess you need is : - open a FileInput

Re: [R] error in Elastic net

2009-08-04 Thread Steve Lianoglou
Hi, On Aug 4, 2009, at 1:03 PM, ram basnet wrote: Dear R users, I am new user for elastic net. I am trying to use elasticnet library. I have marker data with 359 markers and 168 samples, and response is metabolites. I am trying to do regression between a metabolite and markers. But i am

[R] [R-pkgs] Deducer 0.1 : An intuitive cross-platform data analysis GUI

2009-08-04 Thread Ian Fellows
Deducer 0.1 has been released to CRAN Deducer is designed to be a free, easy to use, alternative to proprietary software such as SPSS, JMP, and Minitab. It has a menu system to do common data manipulation and data analysis tasks, and an excel-like spreadsheet in which to view and edit data frames.

[R] error in Elastic net

2009-08-04 Thread ram basnet
Dear R users,   I am new user for elastic net. I am trying to use elasticnet library. I have marker data with 359 markers and 168 samples, and response is metabolites. I am trying to do regression between a metabolite and markers.  But i am getting the following error:   > en<-enet(marker,as.numer

Re: [R] fitted.values less than observed values

2009-08-04 Thread Federico Calboli
Actually, I tried doing data2 = unique(data) mod = lm(y ~ x1 + ... + xn, data2) fitted(mod) and I still get les fitted values than observations. Federico On 4 Aug 2009, at 12:18, Federico Calboli wrote: Hi All, I have some data where the dependent variable is a score, low (1:3) or high (8:

Re: [R] RServe - How to use 'createReference' method?

2009-08-04 Thread Romain Francois
Hi, So the file you want to read is on the client machine, and you want to transfer it to the server and read it into R ? What I guess you need is : - open a FileInputStream, many many tutorials on the web will tell you how this works. - open a RFileOutputStream - call the read(byte[] b) met

Re: [R] read.csv from a remote machine

2009-08-04 Thread Barry Rowlingson
On Tue, Aug 4, 2009 at 3:37 PM, Olga Lyashevska wrote: > Dear all, > > I am trying to import data with read.csv and my file is on remote machine. > I believe that I need to open a connection, not sure about syntax though. If it's on an HTTP server then you don't need to faff with connections, jus

Re: [R] One critical question in R

2009-08-04 Thread Barry Rowlingson
On Tue, Aug 4, 2009 at 4:20 PM, Hyo Karen Lee wrote: > I am currently working on some research which involves huge amounts > of data(it is about 15GB). One point nobody has seemed to make yet is that the above statement is meaningless... Do you have a CSV file that is 15GB big? The important n

Re: [R] survdiff for left-truncated data?

2009-08-04 Thread Terry Therneau
> Does anyone know if there is a function like survdiff which can also handle > left-truncated and right-censored data? When I use it on left-truncated and > right-censored data I get an error message saying Right censored data only. coxph(Surv(time1, time2, status) ~ factor(group), data=mydata)

Re: [R] One critical question in R

2009-08-04 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Hyo Karen Lee > Sent: Tuesday, August 04, 2009 8:21 AM > To: r-help@r-project.org > Subject: [R] One critical question in R > > Hi, > I have one critical question in using R. > I

Re: [R] Comparison of Output from "dwtest" and "durbin.watson"

2009-08-04 Thread Achim Zeileis
On Tue, 4 Aug 2009, Tom La Bone wrote: My concern is that the two tests give different DW statistics for the weighted fit and very different p-values for the same DW statistic for the unweighted fit. Is there a "right" answer here? dwtest() is not handling WLS at the moment. I'll have a look w

Re: [R] One critical question in R

2009-08-04 Thread Steve Lianoglou
Hi, On Aug 4, 2009, at 11:20 AM, Hyo Karen Lee wrote: Hi, I have one critical question in using R. I am currently working on some research which involves huge amounts of data(it is about 15GB). I am trying to use R in this research rather than using SAS or STATA. (The company where I am working

[R] Writing a NetCDF file in R

2009-08-04 Thread Steve Murray
Dear all, I am attempting to convert 10 NetCDF files into a single NetCDF file, due to the data input requirements of a model I hope to use. I am using the ncdf package, version 1.6. The data are global-scale water values, on a monthly basis for 10 years (ie. 120 months of data in total; at pr

[R] One critical question in R

2009-08-04 Thread Hyo Karen Lee
Hi, I have one critical question in using R. I am currently working on some research which involves huge amounts of data(it is about 15GB). I am trying to use R in this research rather than using SAS or STATA. (The company where I am working right now, is trying to switch SAS/STATA to R) As far as

Re: [R] read.csv from a remote machine

2009-08-04 Thread Steve Lianoglou
Hi, On Aug 4, 2009, at 10:37 AM, Olga Lyashevska wrote: Dear all, I am trying to import data with read.csv and my file is on remote machine. I believe that I need to open a connection, not sure about syntax though. I would appreciate any suggestions, Look at the different ways you can

[R] read.csv from a remote machine

2009-08-04 Thread Olga Lyashevska
Dear all, I am trying to import data with read.csv and my file is on remote machine. I believe that I need to open a connection, not sure about syntax though. I would appreciate any suggestions, Thanks! Olga __ R-help@r-project.org mailing list

Re: [R] Help with reshaping data.frame

2009-08-04 Thread davidr
Thanks to Hadley (shortest and sweetest), Eric and Gabor. I was _so_ close. Now I think I've learned some things about the reshape function and package! (Also transform and interaction.) Thanks to you all, -- David -Original Message- From: hadley wickham [mailto:h.wick...@gmail.com] Sent

Re: [R] Comparison of Output from "dwtest" and "durbin.watson"

2009-08-04 Thread Tom La Bone
My concern is that the two tests give different DW statistics for the weighted fit and very different p-values for the same DW statistic for the unweighted fit. Is there a "right" answer here? -- View this message in context: http://www.nabble.com/Comparison-of-Output-from-%22dwtest%22-and-

[R] Efficient coding

2009-08-04 Thread Daniele Amberti
I have a piece of code as the one at the bottom, unfortunately since it involves time series from a db it's not easy to give to mailing list a working script. It becomes very slow after few hundred iterations over variable sp (must process several thousands). The Rprof() indicates that the probl

[R] Building package with vignette

2009-08-04 Thread Richard Chandler
Hello, I have a package that builds fine using R CMD build pkg --no-vignette, but I get the following error when running R CMD build pkg: ** building package indices ... Error in setwd(OutVignetteDir) : cannot change working directory ERROR: installing package indices failed I don't know why it

  1   2   >