[R] How to get intecerpt standard error in PLS

2011-10-23 Thread arunkumar1111
Hi how do we get intercepts standard error. I'm using the package pls. i got the coefficient but not able to get the stabdard error -- View this message in context: http://r.789695.n4.nabble.com/How-to-get-intecerpt-standard-error-in-PLS-tp3932104p3932104.html Sent from the R help mailing

[R] Problem with calling an user defined R function from Java

2011-10-23 Thread Surajit
Dear All, I am facing a problem in calling an user defined R function from Java through JRI. The user defined R function does a loess normalization on micro array data ( find in the limma package of BioConductor) and the last 2 lines of the R Code is : MA <- normalizeWithinArrays(RG, method="loes

[R] How to delete rows using conditions on all columns

2011-10-23 Thread Aher
n <- 10 P1 <- runif(n) P2 <- runif(n) P3 <- P1 + P2 + runif(n)/100 P4 <- P1 + P2 + P3 + runif(n)/100 mydata <- data.frame(cbind(P1,P2,P3,P4)) mydata[1,1] <- 8 mydata[3,1] <- -5 mydata[2,3] <- -6 mydata[7,3] <- 7 f=function(z){quantile(z, c(0.01, 0.99)) } temp1 <- lapply(mydata, f) temp1 $P1

[R] zoo arithmetics

2011-10-23 Thread Hugo Mildenberger
Dear list members, what is the reason that one obviously can't do arithmetic operations on zoo members with different index positions? > require(zoo) > z <- zoo(c(1,1,1),order.by=c(1,2,3)) > z 1 2 3 1 1 1 > z[1] + z[1] 1 2 > z[1:2] + z[1:2] 1 2 2 2 > z[1] +

[R] Date column in downloaded date

2011-10-23 Thread ajc
Hi All: If I download yahoo data by getSymbols() in R, the date column gets accompanied along with the downloaded data. There is no column header for the date column to access separately. What is the way to eliminate the date column? If I want to draw a xy scatter plot with the downloaded price (

Re: [R] RGtk2 problems

2011-10-23 Thread Prof Brian Ripley
Please update your R (and probably your RGtk2: you did not tell us its version), as the posting guide asked you to do before posting. On Sun, 23 Oct 2011, Aref Nammari wrote: Hello, I hope this is the right place to ask for help with a problem I am having with RGtk2 installation with R on Win

[R] Offtopic sourceforge problems?

2011-10-23 Thread Erin Hodgess
Dear R People: I've been trying to get R Portable from sourceforge.net all day today and there is a problem accessing the site. Has anyone else run into that, please? Thank you! Sincerely, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of

Re: [R] summarizing a data frame i.e. count -> group by

2011-10-23 Thread Dennis Murphy
And the plyr version of this would be (using DF as the data frame name) ## transform method, mapping length(runtime) to all observations ## similar to David's results: library('plyr') ddply(DF, .(time, partitioning_mode), transform, n = length(runtime)) # or equivalently, the newer and somewhat fa

Re: [R] Segfault and bad output with fOptions::rnorm.sobol

2011-10-23 Thread Robert McDonald
On Sun, Oct 23, 2011 at 11:48 AM, Robert McDonald wrote: > I think your question is answered by >> >> http://cran.r-project.org/web/packages/fOptions/ChangeLog >> >> 2010-04-23 chalabi >> >>* ChangeLog, DESCRIPTION: updated DESCR and ChangeLog >>* src/085A-LowDiscrepancy.f: fixed

Re: [R] interpreting bootstrap corrected slope [rms package]

2011-10-23 Thread David Winsemius
On Oct 23, 2011, at 7:37 PM, apeer wrote: Does your point about proportionality also hold for ordinality? In other words, if I have several X variables that do not behave in an ordinal fashion with Y, should I still include them in the full model? My understanding or perhaps misunderstandin

[R] RGtk2 problems

2011-10-23 Thread Aref Nammari
Hello, I hope this is the right place to ask for help with a problem I am having with RGtk2 installation with R on Windows XP. I am running R 2.11.1 and have installed the package RGtk2 from CRAN. I also have GTK 2.10.11 installed as well as GTK2-runtime 2.22.0. I have added the environment variab

Re: [R] interpreting bootstrap corrected slope [rms package]

2011-10-23 Thread apeer
Does your point about proportionality also hold for ordinality? In other words, if I have several X variables that do not behave in an ordinal fashion with Y, should I still include them in the full model? My understanding or perhaps misunderstanding of the ordinality assumption was that all X va

Re: [R] summarizing a data frame i.e. count -> group by

2011-10-23 Thread jim holtman
Another package to consider, especially if your dataframe is large, is 'data.table': > tp <- read.table(textConnection(" time partitioning_mode workload runtime + 1 1 shardingquery 607 + 2 1 shardingquery 85 + 3 1 shardingquery 52 +

Re: [R] Creating 2 week intervals (lubridate)

2011-10-23 Thread David Winsemius
On Oct 23, 2011, at 4:18 PM, > wrote: Hello, I have a list of dates in which I am going use for a time series analysis. I want to break these dates up into 2 week intervals and count the number of times a date appears in this interval. For example from Nov. 19, 2000 to Dec 2 ,2000 with t

[R] manova/tukey test

2011-10-23 Thread Molly MacLeod
Hello, I am trying to do a manova test in r, and have used the "manova" function to test differences between two dependent variables. The results were significant for the whole model, but the sources I've read say that in order to do a post-hoc multiple comparison, I have to do separate aovs for e

[R] diptest

2011-10-23 Thread Matilde
I am a very new user of R and I need some suggestions on how perform a diptest. I dowloaded the package diptest. following instructions given by the file I attach R I performed a diptest on the dataset statfaculty. However I do not manage to do it with my dataset that consists of a single column

Re: [R] interpreting bootstrap corrected slope [rms package]

2011-10-23 Thread Frank Harrell
You also did unaccounted for stepwise selection. Regarding the proportional odds assumption, if you assessed it correctly, something that is not operating proportionally would have to be associated with the outcome for at least one cutoff of Y, so you could say that you are doing reverse screening

[R] code review: is it too much to ask?

2011-10-23 Thread Giovanni Azua
Hello all, I really appreciate how helpful the people in this list are. Would it be too much to ask to send a small script to have it peer-reviewed? to make sure I am not making blatant mistakes? The script takes an experiment.dat as input and generates system Throughput using ggplot2. It works

[R] cex multiplier not exact

2011-10-23 Thread Ali Tofigh
Hi, When I plot text and use cex to change the text size, I notice that the cex multiplier is not exact. It looks as if the real size of text can take only certain discrete values. Is there a workaround to get text to follow the cex value more closely, or at least to be able to figure out what the

[R] Creating 2 week intervals (lubridate)

2011-10-23 Thread sparklegirl100
Hello, I have a list of dates in which I am going use for a time series analysis. I want to break these dates up into 2 week intervals and count the number of times a date appears in this interval. For example from Nov. 19, 2000 to Dec 2 ,2000 with the data listed below I want to return Start_d

Re: [R] how to delete rows by a list of rownames

2011-10-23 Thread hanansela
Thank you, Michael This is what i need. It works fine -- View this message in context: http://r.789695.n4.nabble.com/how-to-delete-rows-by-a-list-of-rownames-tp3930206p3931200.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-pr

Re: [R] Summary stats in table

2011-10-23 Thread Tyler Rinker
I had to set it up as a data frame and then it workd beautifully with the reshape package. DF<-data.frame(A,B,x) library(reshape) cast(DF, A ~ B, fun.aggregate=mean, margins=c("grand_row", "grand_col")) Cheers Tyler > Date: Sun, 23 Oct 2011 14

Re: [R] summarizing a data frame i.e. count -> group by

2011-10-23 Thread Tyler Rinker
This could be done with aggregate but I am unfamiliar with it so I'll give what I think you want from your message using the library 'reshape' that you'll have to doneload. If you're problem is large the data.table library would be much faster. You haven't really said what you'd like to get

Re: [R] symmetric matrix multiplication

2011-10-23 Thread statfan
Thank you Dan and Ted for these helpful comments. I will implement this simple force symmetry code you suggested and make sure I familiarize with this floating-point calculation problem so I can recognize such issues in the future. -- View this message in context: http://r.789695.n4.nabble.com/sy

Re: [R] how to save an R object to a remote computer

2011-10-23 Thread Molly Davies
Thank you for the suggestions! I'm actually running simulations in R over two separate networks (and thus will need to smile sweetly (and authentically, of course!) twice). In one, I am ssh-ing from my Mac laptop into one Mac machine with 32 cpu. In the other, I am ssh-ing into a cluster and am

Re: [R] Exponential fit of form y=exp(a*x) and not of form y=l*e

2011-10-23 Thread Ted Harding
On 23-Oct-11 19:03:05, Carl Witthoft wrote: > You misused nls(). Observe: > > x<- 1:101 > y2 <- 5*exp(x/20) + runif(101)/100 # nls will NOT converge for perfect > data. > > nls(y2 ~ exp(A*x), start=list(A=.1)) > > Nonlinear regression model >model: y2 ~ exp(A * x) > data: parent.frame

Re: [R] how to save an R object to a remote computer

2011-10-23 Thread Barry Rowlingson
On Sun, Oct 23, 2011 at 7:46 PM, Molly Davies wrote: > Hello, > > I am running R remotely on my university's network from my laptop (Macbook > Pro, running leopard, in case this is useful). I have a strict limit on how > much disk space I can take up on my network account at school, which is >

Re: [R] Exponential fit of form y=exp(a*x) and not of form y=l*exp(a*x)

2011-10-23 Thread Carl Witthoft
You misused nls(). Observe: x<- 1:101 y2 <- 5*exp(x/20) + runif(101)/100 # nls will NOT converge for perfect data. nls(y2 ~ exp(A*x), start=list(A=.1)) Nonlinear regression model model: y2 ~ exp(A * x) data: parent.frame() A 0.06709 residual sum-of-squares: 136703 Number of ite

[R] how to save an R object to a remote computer

2011-10-23 Thread Molly Davies
Hello, I am running R remotely on my university's network from my laptop (Macbook Pro, running leopard, in case this is useful). I have a strict limit on how much disk space I can take up on my network account at school, which is insufficient for the size of some of the objects I need to create

Re: [R] plotting with a symbol on every nth point

2011-10-23 Thread Carl Witthoft
If you just want the same symbol at each point, you could use Weylandt's approach, tho' personally I think it's tidier to create a new vector x10 <- x[seq(1,length(x),by=10)] and plot that. If you would like a different symbol at each point, then take a look at ?text. From: R. Michael

[R] Summary stats in table

2011-10-23 Thread Duncan Murdoch
Suppose I have data like this: A <- sample(letters[1:3], 1000, replace=TRUE) B <- sample(LETTERS[1:2], 1000, replace=TRUE) x <- rnorm(1000) I can get a table of means via tapply(x, list(A, B), mean) and I can add the marginal means to this using cbind/rbind: main <- tapply(x, list(A,B), mean)

Re: [R] summarizing a data frame i.e. count -> group by

2011-10-23 Thread David Winsemius
On Oct 23, 2011, at 1:29 PM, Giovanni Azua wrote: Hello, This is one problem at the time :) I have a data frame df that looks like this: > df <-read.table(textConnection(" time partitioning_mode workload runtime + 1 1 shardingquery 607 + 2 1 shardingq

[R] summarizing a data frame i.e. count -> group by

2011-10-23 Thread Giovanni Azua
Hello, This is one problem at the time :) I have a data frame df that looks like this: time partitioning_mode workload runtime 1 1 shardingquery 607 2 1 shardingquery 85 3 1 shardingquery 52 4 1 shardingquery

Re: [R] unfold list (variable number of columns) into a data frame

2011-10-23 Thread Giovanni Azua
Hi Dennis, Thank you very nice :) Best regards, Giovanni On Oct 23, 2011, at 6:55 PM, Dennis Murphy wrote: > Hi: > > Here's one approach: > > # Function to process a list component into a data frame > ff <- function(x) { > data.frame(time = x[1], partitioning_mode = x[2], workload = x[3],

Re: [R] setMethod "[" - extract by names within Slot

2011-10-23 Thread Martin Morgan
On 10/22/2011 08:03 AM, Omphalodes Verna wrote: Thanks Martin. Here is my ''updated'' code. setClass("myClass", representation(ID.r = "numeric", ID.c = "character", DAT = "matrix")) to.myClass<- function(ID.r, ID.c, DAT) { out<- new("myClass", ID.r = ID.r, ID.c = ID.c, DAT = DAT) re

Re: [R] Imposing Feller condition using project constraint in spg

2011-10-23 Thread Kristian Lind
Hi Ravi, Thank you for your reply and please excuse my late response. Plugging w2’ = k/w1’ from (A) into (B) yields (C) f(w1') = (w1-w1’)^2 + (w2-k/w1’)^2 The partial derivative wrt w1' is (D) df(w1')/ dw1' = -2(w1-w1’) + 2(w2-k/w1’)*k/(w1')^2 in order for this to be a minimum the f.o.c. df(w

Re: [R] Exponential fit of form y=exp(a*x) and not of form y=l*exp(a*x)

2011-10-23 Thread Ben Bolker
Henri Mone gmail.com> writes: > I want to fit to my data an exponential function with following > functional form: > y=exp(a*x) > > I used the function "nls" but this gives me exponential fits with > following functional form: > y=l*exp(a*x) > > With "l" being an scaling factor. What do I need

Re: [R] unfold list (variable number of columns) into a data frame

2011-10-23 Thread Dennis Murphy
Hi: Here's one approach: # Function to process a list component into a data frame ff <- function(x) { data.frame(time = x[1], partitioning_mode = x[2], workload = x[3], runtime = as.numeric(x[4:length(x)]) ) } # Apply it to each element of the list: do.call(rbind, lapply(

[R] Mlogit dummy problem

2011-10-23 Thread Ville Iiskola
Hi I have tried to estimate race winning probabilities with mlogit in R. I have different amount of contestors in the races and mlogit has a bug so that in those situations the mlogit does not work. So i tried to add dummy contestors to the race so that every race has an equal amount of conte

Re: [R] interpreting bootstrap corrected slope [rms package]

2011-10-23 Thread apeer
I guess I must be misunderstanding the point of checking the ordinality assumptions prior to fitting a model. Are you saying that a response variable that does not behave in an ordinal fashion can still be included in the initial and final model? -- View this message in context: http://r.789695.

[R] Exponential fit of form y=exp(a*x) and not of form y=l*exp(a*x)

2011-10-23 Thread Henri Mone
Dear R Users, Beginners and Experts, I want to fit to my data an exponential function with following functional form: y=exp(a*x) I used the function "nls" but this gives me exponential fits with following functional form: y=l*exp(a*x) With "l" being an scaling factor. What do I need to change in

Re: [R] Segfault and bad output with fOptions::rnorm.sobol

2011-10-23 Thread Robert McDonald
> > I think your question is answered by > > http://cran.r-project.org/web/packages/fOptions/ChangeLog > > 2010-04-23 chalabi > >* ChangeLog, DESCRIPTION: updated DESCR and ChangeLog >* src/085A-LowDiscrepancy.f: fixed sobol RVS on 64 bit platform >* ChangeLog, DESCRIPTION

Re: [R] how to plot a distribution of mean and standard deviation

2011-10-23 Thread Ben Bolker
R. Michael Weylandt gmail.com> writes: > It seems like the relevant plot would depend on what you are trying to > investigate, but usually a scatterplot would well work for bivariate > data with no other assumptions needed. I usually find ecdf() plots > rather hard to interpret without playing ar

Re: [R] interpreting bootstrap corrected slope [rms package]

2011-10-23 Thread Frank Harrell
That's not reasonable for 2 reasons. First, selecting variables based on apparent assumption satisfaction is an unexplored technique. Second, you failed to account for variable selection during resampling validation. You will need to give the model all CANDIDATE variables and use the bw=TRUE opt

[R] unfold list (variable number of columns) into a data frame

2011-10-23 Thread Giovanni Azua
Hello, I used R a lot one year ago and now I am a bit rusty :) I have my raw data which correspond to the list of runtimes per minute (minute "1" "2" "3" in two database modes "sharding" and "query" and two workload types "query" and "refresh") and as a list of char arrays that looks like this:

Re: [R] A problem with chol() function

2011-10-23 Thread Bert Gunter
Perhaps to clarify Prof. Ripley's remarks below , the part that you missed was "symmetric," which your matrix obviously is not. -- Bert 2011/10/23 Prof Brian Ripley > On Sun, 23 Oct 2011, Ron Michael wrote: > > I think I am missing something with the chol() function. Here is my >> calculation:

Re: [R] How to create a new variable based on parts of another character variable.

2011-10-23 Thread jim holtman
Use regular expressions ?grepl On Sunday, October 23, 2011, Philipp Fischer wrote: > Hello, > I am just starting with R and I am having a (most probably) stupid problem by creating a new variable in a data.frame based on a part of another character variable. > > I have a data frame like this one

[R] How to create a new variable based on parts of another character variable.

2011-10-23 Thread Philipp Fischer
Hello, I am just starting with R and I am having a (most probably) stupid problem by creating a new variable in a data.frame based on a part of another character variable. I have a data frame like this one: A B C AWI-test1 1 i AWI-test5

[R] how to delete rows by a list of rownames

2011-10-23 Thread hanansela
Hello I have a list of row names that needs to be deleted from a data frame. how do i do that. one of the columns in the data frame contains the row names as numbers I can also select by this column(will it be easier?). Thank you -- View this message in context: http://r.789695.n4.nabble.com/

Re: [R] interpreting bootstrap corrected slope [rms package]

2011-10-23 Thread apeer
Dr. Harrell, Thanks for your response. The predictor variables I initially included in the model were based on the x mean plots and whether they exhibited ordinality and whether they appeared to meet the CR assumptions. Only 7 of 16 potential variables fit that designation and those are the vari

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

2011-10-23 Thread mihalicza . peter
Október 19-től 21-ig irodán kívül vagyok, és az emailjeimet nem érem el. Sürgős esetben kérem forduljon Kárpáti Edithez (karpati.e...@gyemszi.hu). Üdvözlettel, Mihalicza Péter I will be out of the office from 19 till 21 October with no access to my emails. In urgent cases please contact Ms. Ed

Re: [R] how to delete rows by a list of rownames

2011-10-23 Thread R. Michael Weylandt
I think that only works because the rows are ordered and have no names: try something more like this: df1 <- data.frame(1:20, 21:40, 31:50) rownames(df1) <- sample(letters, 20) toDrop <- sample(rownames(df1), 5) df1[ !(rownames(df1) %in% toDrop), ] or alternatively toKeep <- sample(rownames(df

Re: [R] how to delete rows by a list of rownames

2011-10-23 Thread B77S
here is one way df1 <- data.frame(c(1:20), c(21:40), c(31:50)) list1 <- c(3, 6, 20) df2 <- df1[-list1,] hanansela wrote: > > Hello > I have a list of row names that needs to be deleted from a data frame. How > do i do that? > one of the columns in the data frame contains the row names as nu

Re: [R] how to plot a distribution of mean and standard deviation

2011-10-23 Thread R. Michael Weylandt
It seems like the relevant plot would depend on what you are trying to investigate, but usually a scatterplot would well work for bivariate data with no other assumptions needed. I usually find ecdf() plots rather hard to interpret without playing around with the data elsewhere first and I'm not su

Re: [R] issue loading doBy library

2011-10-23 Thread Gabor Grothendieck
On Sun, Oct 23, 2011 at 8:10 AM, Giovanni Azua wrote: > Hi Josh, > > Thank you for your feedback, after lot of trial and error the problem is > finally solved. > > To solve this problem, I tried in this order: > > 1) uninstalling the two packages "Matrix" and "lme4" and reinstalling them. > 2) un

Re: [R] issue loading doBy library

2011-10-23 Thread Giovanni Azua
Hi Josh, Thank you for your feedback, after lot of trial and error the problem is finally solved. To solve this problem, I tried in this order: 1) uninstalling the two packages "Matrix" and "lme4" and reinstalling them. 2) uninstalling doBy and reinstalling it with and without 1) 3) upgrading t

[R] how to plot a distribution of mean and standard deviation

2011-10-23 Thread gj
Hi, I have the following data about courses (504) in a university, two attributes about the proportion of resources used (#resources_used / #resources_available), namely the average and the standard deviation. Thus I have: [1] n=504 rows [2] 1 id column and 2 attributes Here's a sample of the data

Re: [R] A problem with chol() function

2011-10-23 Thread Prof Brian Ripley
On Sun, 23 Oct 2011, Ron Michael wrote: I think I am missing something with the chol() function. Here is my calculation:   mat [,1] [,2] [,3] [,4] [,5] [1,]    1    3    0    0    0 [2,]    0    1    0    0    0 [3,]    0    0    1    0    0 [4,]    0    0    0    1    0 [5,]    0    0   

Re: [R] R for loop stops after 4 iterations

2011-10-23 Thread Philip Robinson
That's fantastic, thank you very much, the qnorm option is interesting, I will have to play around with it. Many thanks again Philip -Original Message- From: R. Michael Weylandt [mailto:michael.weyla...@gmail.com] Sent: Sunday, 23 October 2011 10:28 AM To: Philip Robinson Cc: r-help@r-pr

[R] A problem with chol() function

2011-10-23 Thread Ron Michael
I think I am missing something with the chol() function. Here is my calculation:   > mat [,1] [,2] [,3] [,4] [,5] [1,]    1    3    0    0    0 [2,]    0    1    0    0    0 [3,]    0    0    1    0    0 [4,]    0    0    0    1    0 [5,]    0    0    0    0    1 > eigen(mat) $values [1] 1 1 1

Re: [R] Data frame manipulation by eliminating rows containing extreme values

2011-10-23 Thread aajit75
Hi David, Thanks for the reply, f=function(x){quantile(x, c(0.25, 0.75),na.rm = TRUE) - matrix(IQR(x,na.rm = TRUE) * c(1.5), nrow = 1) %*% c(-1, 1)} Here parameter 1.5 is set for example in the above function as argument, it can be even more may be 3.0 after analyzing actual data. Here expecta

[R] FW: Re: symmetric matrix multiplication

2011-10-23 Thread Ted Harding
Just to avoid possible confusion, let me correct a typo (at step [2] in the example below). Apologies! -FW: - Date: Sun, 23 Oct 2011 08:43:27 +0100 (BST) Sender: r-help-boun...@r-project.org From: (Ted Harding) To: r-help@r-project.org Subject: Re: [R] symmetric matrix multiplication On

Re: [R] symmetric matrix multiplication

2011-10-23 Thread Ted Harding
On 23-Oct-11 07:00:07, Daniel Nordlund wrote: >> -Original Message- >> From: r-help-boun...@r-project.org >> [mailto:r-help-boun...@r-project.org] >> On Behalf Of statfan >> Sent: Saturday, October 22, 2011 10:45 PM >> To: r-help@r-project.org >> Subject: [R] symmetric matrix multiplication

Re: [R] symmetric matrix multiplication

2011-10-23 Thread Daniel Nordlund
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of statfan > Sent: Saturday, October 22, 2011 10:45 PM > To: r-help@r-project.org > Subject: [R] symmetric matrix multiplication > > I have a symmetric matrix B (17x17), and a (17x