[R] Tick label orientation

2009-04-01 Thread Murray Jorgensen
I had hoped that plot(c(0,24),c(0,-6),xlab="Time",ylab="Day", type="n", main="This Week",axes=FALSE) axis(2,at=0:(-6), labels = c("Sun","Mon","Tues","Wed","Thurs","Fri","Sat"),hadj=TRUE) axis(1,at=seq(0,24,4)) would give me horizontal tick labels. It doesn't. What would? Murray -- Dr M

Re: [R] list substring

2009-04-01 Thread calpeda
I was suggested to use x = data.frame(string = c( "x1", "x2", "x3")) x apply(x,1,substr,1,4) and it's worked good! Thank you all Wacek Kusnierczyk wrote: > > calpeda wrote: >> thank you, >> but I m importing data from a txt file and I have a matrix of n*1 >> The function str s

[R] how to deal with errors

2009-04-01 Thread Thomas Keller
Greetings, Could someone give me some help on how to solve problems with packages? This worked just yesterday. Today I get an error. ? > library(Rcmdr) Error in structure(.External("dotTclObjv", objv, PACKAGE = "tcltk"), class = "tclObj") : [tcl] invalid command name "font". Error : .onAt

Re: [R] Scatter plot

2009-04-01 Thread markleeds
Hi Stephen: If you want to take tem out of quotes, you can use deparse substitute as in below. Maybe there are other ways also but that's the one I often see used. I hope this email ends up looking okay because my mailer has been acting strangely lately.          Â

Re: [R] Matrix multiplication - code problem

2009-04-01 Thread MarcioRibeiro
Hi again... I will get an array with 5 matrix 2x2, with dimension 2x2x5 This code below works fine... And I am applying the same procedure... The problem might be when I do the permutation of the array, but I checked the dimension and its all right... array1 <- array(1:30,dim=c(3,2,5)) array2 <-

[R] paste to collapse vector to string

2009-04-01 Thread Xiao-Jun Ma
Hi, I'm trying to collapse a character vector to strings, but I am getting unexpected behaviors in list context: A <- "a" B <- c("b","c") xx <- list(A=A, B=B) lapply(xx, paste, collaplse=".") $A [1] "a ." $B [1] "b ." "c ." paste(B, collapse=".") [1] "b.c" # this is what I

[R] Matrix multiplication - code problem

2009-04-01 Thread MarcioRibeiro
Hi listers, I am having some trouble in a matrix multiplication... I have already checked some posts, but I didn't find my problem... I have the following code... But I am not getting the right multiplication... I checked the dimension and they are fine... id_y <- array(1:10,dim=c(2,1,5)) id_yt<-

Re: [R] Recode of text variables

2009-04-01 Thread Gabor Grothendieck
doBy and memisc packages have recoding functions as well, e.g. > library(doBy) > x<-c("A","B","C","D","E","A") > out <- recodevar(x, list(c("A", "B"), c("C", "D", "E")), list("Treat 1", > "Treat 2")) > recodevar(x, list(c("A", "B"), c("C", "D", "E")), list("Treat 1", "Treat 2")) [1] "Treat 1" "Tr

Re: [R] Scatter plot

2009-04-01 Thread stephen sefick
#excel like regression line but better reg.line <- function(y,x, data) {plot(data[,y]~data[,x], main=paste(x,"vs.",y, sep=" "), xlab=x, ylab=y, pch=20) line <- lm(data[,y]~data[,x]) d <- summary(line) mtext(3, line=1, adj=0.25 ,text=bquote(bold(R^2== ~ .(d$r.squared))), bty="n") abline(line)} x <

Re: [R] Matrix multiplication - code problem

2009-04-01 Thread Ben Bolker
I think your problem is with R's behavior of dropping array indices when dim==1. Simulating that > m1 <- matrix(1:2,nrow=2) > m2 <- matrix(1:2,ncol=2) > m1 %*% m2 [,1] [,2] [1,]12 [2,]24 > m1[,] %*% m2[,] [,1] [1,]5 [1,]5 > m1[,,drop=FALSE] %*% m2[,,drop=

Re: [R] Scatter plot

2009-04-01 Thread Peter Alspach
Tena koe Sueli ?abline ?text HTH ... Peter Alspach > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Sueli Rodrigues > Sent: Thursday, 2 April 2009 2:35 p.m. > To: r-help@r-project.org > Subject: [R] Scatter plot > > > Hi.

[R] Scatter plot

2009-04-01 Thread Sueli Rodrigues
Hi. How do I plot the straight line and r² in a scatter plot using a simple file x~y? Sueli Rodrigues Eng. Agrônoma - UNESP Mestranda - USP/ESALQ PPG-Solos e Nutrição de Plantas Fones (19)93442981 (19)33719762 __ R-help@r-project.org mailing lis

Re: [R] use R Group SFBA April meeting reminder; video of Feb k

2009-04-01 Thread Gad Abraham
Ron @ Lecturemaker wrote: Hi Ted and others, I appreciate your time in sharing R user group experience with my video player scheme. Over time, I hope to iron out all issues your views encounter. For now I think I have a good solution for flash 10 upgrade issue. See screenshot "flash10warning.

Re: [R] Vector of Vectors

2009-04-01 Thread jim holtman
This may help in understanding how to access the list: notice that I am using numeric indices and using the '[[' operator > # generate a list with a varying number of values > myList <- list() # initialize > for (i in 1:10) myList[[i]] <- seq(i) > myList [[1]] [1] 1 [[2]] [1] 1 2 [[3]] [1] 1 2

Re: [R] Matrix multiplication - code problem

2009-04-01 Thread Ben Bolker
MarcioRibeiro wrote: > > Hi listers, > I am having some trouble in a matrix multiplication... > I have already checked some posts, but I didn't find my problem... > I have the following code... > But I am not getting the right multiplication... > I checked the dimension and they are fine... >

[R] R_LIBS in Windows Vista

2009-04-01 Thread Stephen Tucker
Hello, I am trying to install R and have it running through ESS on a Vista machine that is not mine (I am only familiar with Windows XP and Ubuntu Linux) so please pardon my unfamiliarity... The Rgui.exe installation works fine and package installation also appears to work fine. The base pack

Re: [R] Recode of text variables

2009-04-01 Thread John Fox
Dear Andy, There are two problems here: One is that you need to enclose character values in quotes; the other is a bug in recode(), which is confused by the values "Treat 1" and "Treat 2" and shouldn't be. Here's a work-around [until tomorrow, when I'll fix recode()]: > as.character(recode(x, "c(

Re: [R] Deriving Samples from specific, not implemented PDF for a QQ-Plot

2009-04-01 Thread David Winsemius
I am puzzled to hear that repeating only plotting give different results, if there were no further simulations. Both rt() and sample() should give different results from call to call, so if either of those functions were repeated, then varying results *should* occur. If that is not the source of th

Re: [R] Recode of text variables

2009-04-01 Thread Bill.Venables
Oh ALRIGHT! But as he didn't express the question completely, you had to view my response as a *strategy* that could be used rather than a full answer to an incomplete question. Still, I never did make any claim to infalibility, and nor will I ever do. I'm always happy, indeed grateful, to

Re: [R] Recode of text variables

2009-04-01 Thread Rolf Turner
Uhhh, Bill, he wanted E to be recoded as ``Treat 3''. And he didn't say ***what*** he wanted to happen to D. Fancy. A chance to ``correct'' Bill Venables for a second time in two days! :-) cheers, Rolf On 2/04/2009, at 12:39 PM, bill.venab...@csiro.au wrote: Here i

Re: [R] Recode of text variables

2009-04-01 Thread Rolf Turner
On 2/04/2009, at 12:22 PM, Andrew McFadden wrote: Hi all I am trying to do a simple recode which I am stumbling on. I figure there must be any easy way but haven't come across it. Given data of A","B","C","D","E","A" it would be nice to recode this into say three categories ie A and B becomes

Re: [R] Recode of text variables

2009-04-01 Thread Bill.Venables
Here is one way > x <- c("A", "B", "C", "D", "E", "A") > x [1] "A" "B" "C" "D" "E" "A" > f <- factor(x) > levels(f) [1] "A" "B" "C" "D" "E" > levels(f) <- c(rep("Treat1",2), rep("Treat2", 3)) > f [1] Treat1 Treat1 Treat2 Treat2 Treat2 Treat1 Levels: Treat1 Treat2 > If you really want the charact

Re: [R] Public R servers?

2009-04-01 Thread hadley wickham
> Earlier I posted a question about memory usage, and the community's input was > very helpful.  However, I'm now extending my dataset (which I use when > running a regression using lm).  As a result, I am continuing to run into > problems with memory usage, and I believe I need to shift to impl

[R] Recode of text variables

2009-04-01 Thread Andrew McFadden
Hi all I am trying to do a simple recode which I am stumbling on. I figure there must be any easy way but haven't come across it. Given data of A","B","C","D","E","A" it would be nice to recode this into say three categories ie A and B becomes "Treat1", C becomes "Treat 2" and E becomes "Treat 3"

Re: [R] Convert Character to Date

2009-04-01 Thread Bill.Venables
I stand corrected, with thanks! Gee you learn some fascinating stuff on this mailing listjust fascinating... :-) W. Bill Venables http://www.cmis.csiro.au/bill.venables/ -Original Message- From: Greg Snow [mailto:greg.s...@imail.org] Sent: Thursday, 2 April 2009 5:58 AM To: Ve

Re: [R] Definition of = vs. <-

2009-04-01 Thread Peter Dalgaard
Wacek Kusnierczyk wrote: Stavros Macrakis wrote: `->` Error: object "->" not found that's weird! Why??? -- O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen

[R] Reading from Google Spreadsheets with RGoogleDocs

2009-04-01 Thread Farrel Buchinsky
I cannot read google spreadsheets. I get the following error: assignment of an object of class "NULL" is not valid for slot "access" in an object of class "GoogleSpreadsheet"; is(value, "character") is not TRUE RGoogleDocs is on the cusp of brilliance. How can I troubleshoot this apparently last

Re: [R] use R Group SFBA April meeting reminder; video of Feb k

2009-04-01 Thread Ron @ Lecturemaker
Hi Ted and others, I appreciate your time in sharing R user group experience with my video player scheme. Over time, I hope to iron out all issues your views encounter. For now I think I have a good solution for flash 10 upgrade issue. See screenshot "flash10warning.png" for example of flash ve

[R] lme between-group and within-group covariance

2009-04-01 Thread MUHC-Research
Dear R users, I would be interested in using the lme() function to fit a linear mixed model to a longitudinal dataset. I know this function allows for the specification of a within-group covariance structure. However, does it allow for the explicit specification of a between-group covariance stru

[R] RJDBC error with db2 driver

2009-04-01 Thread Sicotte, Hugues
Anybody knows what could be the problem? I am trying to use the class4 (I also tried the class2) JDBC driver for DB2 and I get the following error. This driver is for db2 9.5, so it does not require a matching license .jar file, and I tried redownloading the driver. I am running R 2.6 on Windows X

Re: [R] help with ggplot2 -- ggpoint function missing?

2009-04-01 Thread Tobias Verbeke
Hi, I'm trying to follow the ggplot introduction here: http://had.co.nz/ggplot/ggplot-introduction.pdf I've installed ggplot2 with install.packages("ggplot2", dep=T) but when I try to run print(ggpoint(p, list(colour = sex))) I get an error: Error in print(ggpoint(p, list(colour = sex))) : c

Re: [R] unicode only works with a second one

2009-04-01 Thread Thomas Steiner
Hi, thanks for all your hints. > One of the points of my.symbols is that you can define your own symbols to > use with it (hence the my). I tried this and it works fine. I need all the symbols and I will probably not trace them, but copy the svg code and modify them from http://commons.wikimedia

Re: [R] Definition of = vs. <-

2009-04-01 Thread Wacek Kusnierczyk
Martin Morgan wrote: > >> x <- y = 1 >> > Error in (x <- y) = 1 : object 'x' not found > this error does not make sense to me... if the precedence is as the parentheses suggest, the error should be like in (x <- y) # error: object 'y' not found vQ __

[R] VAR with binary endogenous variables

2009-04-01 Thread John Kerpel
Hi all! Does anyone know if a vector autoregression package is avaialable that allows binary variables as part of the endogenous system? I'm looking for something along the lines of what is implemented in "Dynamic Forecasts of Qualitative Variables: A Qual VAR Model of US Recessions" by Michael D

Re: [R] Plotting a time series

2009-04-01 Thread stephen sefick
don't use the type argument. You are telling plot to plot points. also please use dput() to make example code that can be cut and pasted out of the email right into R, so that your problem is reproducible. Stephen On Wed, Apr 1, 2009 at 2:52 PM, Thomas Adams wrote: > I have data that I read in

Re: [R] STACK

2009-04-01 Thread baptiste auguie
perhaps, unlist(d, use.names=F) baptiste On 1 Apr 2009, at 22:15, oscar linares wrote: Dear Rxperts I have a data.frame as follows ABCD 14 710 25 811 36 912 I want to convert it to a data frame with a single row (i.e., stack the columns w

[R] help with ggplot2 -- ggpoint function missing?

2009-04-01 Thread haettulegur
I'm trying to follow the ggplot introduction here: http://had.co.nz/ggplot/ggplot-introduction.pdf I've installed ggplot2 with install.packages("ggplot2", dep=T) but when I try to run print(ggpoint(p, list(colour = sex))) I get an error: Error in print(ggpoint(p, list(colour = sex))) : could n

[R] STACK

2009-04-01 Thread oscar linares
Dear Rxperts I have a data.frame as follows ABCD 14 710 25 811 36 912 I want to convert it to a data frame with a single row (i.e., stack the columns without the heading) 1 2 3 4 5 6 7 8 9 10 11 12 Any suggestions please. Thanks in advance! --

Re: [R] Public R servers?

2009-04-01 Thread Tobias Verbeke
Hi Aaron, Earlier I posted a question about memory usage, and the community's input was very helpful. However, I'm now extending my dataset (which I use when running a regression using lm). As a result, I am continuing to run into problems with memory usage, and I believe I need to shift to imp

Re: [R] CORRECTION: Re: Multicollinearity with brglm?

2009-04-01 Thread Ioannis Kosmidis
Could you please include some code that demonstrates your problem? Best wishes, Ioannis On Wednesday 01 April 2009 15:26:33 woodbomb wrote: > I'm running brglm to do binomial loguistic regression. > > The perhaps multicollinearity-related feature(s) are: > > (1) the k IVs are all binary categori

Re: [R] Variable Wildcard Value

2009-04-01 Thread Francis Smart
Thanks Romain, That code seems to be working pretty well, though for some reason it seems to be dropping a few observations. I am not sure why. No this isn't a April-fools joke :P Francis On Wed, Apr 1, 2009 at 1:03 PM, Rolf Turner wrote: > > This whole thing is an April Fool's joke.  Isn't

Re: [R] Calculating First Occurance by a factor

2009-04-01 Thread jwg20
Thanks! That did it. I should have seen that I needed the comma! hadley wrote: > >> I tried messing with the line df$FixTime[which.min(df$FixInx)] changing >> it >> to df[which.min(df$FixInx)] or adding new lines with the additional >> columns >> that I want to include, but nothing seemed to

Re: [R] Constrined dependent optimization.

2009-04-01 Thread Ben Bolker
rkevinburton wrote: > > Thank you I had not considered using "gradient" in this fashion. Now as an > add on question. You (an others) have suggested using SANN. Does your > answer change if instead of 100 "variables" or bins there are 20,000? From > the documentation L-BFGS-B is designed for a

Re: [R] Latex symbols in R (\perp and \parallel)

2009-04-01 Thread Ben Bolker
Lorenzo Isella wrote: > > I am sure this is a one-liner, but I cannot find the R command to > generate the LaTex symbols \perp and \parallel. > I took Dieter Menne's and Brian Ripley's examples, extended them slightly with Hershey font analogues, and posted the results at http://wiki.r-pro

Re: [R] Latex symbols in R (\perp and \parallel)

2009-04-01 Thread Ben Bolker
Lorenzo Isella wrote: > > I am sure this is a one-liner, but I cannot find the R command to > generate the LaTex symbols \perp and \parallel. > I took Dieter Menne's and Brian Ripley's examples, extended them slightly with Hershey font analogues, and posted the results at http://wiki.r-pro

[R] How to set the number of multiple comparisions (Bonferroni-Holm)

2009-04-01 Thread Rabea Sutter
Hello. We have a question concerning the nonparametric analysis of a dataset, which resulted in rejection of the null hypothesis (Kruskal-Wallis-test = H-test). In order to find out which sample means actually are statistically different, we want to do multiple comparisons with the Wilcoxon rank s

Re: [R] Plotting multiple ablines

2009-04-01 Thread Rolf Turner
On 2/04/2009, at 7:04 AM, Thomas Levine wrote: I really want to do this: abline( a=tan(-kT*pi/180), b=kY-tan(-kT*pi/180)*kX ) where kX,kY and kT are vectors of equal length. But I can't do that with abline unless I use a loop, and I haven't figured out the least unelegant way of writing the l

Re: [R] Definition of = vs. <-

2009-04-01 Thread Wacek Kusnierczyk
Stavros Macrakis wrote: > >> `->` >> > Error: object "->" not found > that's weird! vQ __ 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.htm

Re: [R] Calculating First Occurance by a factor

2009-04-01 Thread Glen Sargeant
pmatch() facilitates a very simple solution: #Data IA <- factor(c(1,2,2,3,3,4,3,5,5)) FixTime <- c(200,350,500,600,700,850,1200,1350,1500) #First occurrence of each level first. <- pmatch(levels(IA),IA) #Use first occurrence to subscript a vector or data frame FixTime[first.] A simple way to a

Re: [R] Convert Character to Date

2009-04-01 Thread Greg Snow
Just to correct/expand/clarify the parenthetical below (how often is there a chance to correct or clarify something posted by Bill Venables?), the ides are the 15th of March, May, July, and October, but the 13th of the other months. So if you want to use the ides as the date to use, you will ne

Re: [R] something equivalent to "switch" condition

2009-04-01 Thread Rolf Turner
On 2/04/2009, at 8:37 AM, Jason Rupert wrote: Is there any syntax in R that allows a "switch"-type condition to be used? switch(variable){ case CONSTANT_VALUE; break; default: break; } ?switch ## Attention:

Re: [R] something equivalent to "switch" condition

2009-04-01 Thread Gábor Csárdi
How about reading ?switch ? Best, Gabor On Wed, Apr 1, 2009 at 9:37 PM, Jason Rupert wrote: > > Is there any syntax in R that allows a "switch"-type condition to be used? > > switch(variable){ >   case CONSTANT_VALUE; >   break; > >   default: >   break; > } > > > Thanks, > Jason > > ___

[R] something equivalent to "switch" condition

2009-04-01 Thread Jason Rupert
Is there any syntax in R that allows a "switch"-type condition to be used? switch(variable){ case CONSTANT_VALUE; break; default: break; } Thanks, Jason __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinf

Re: [R] unicode only works with a second one

2009-04-01 Thread Greg Snow
One of the points of my.symbols is that you can define your own symbols to use with it (hence the my). I downloaded a graphic of the aries symbol (your original attempt in unicode I belive) and used the following code to trace the left half of the symbol (starting bottom center), then used that

Re: [R] Noobie ANOVA intercept question

2009-04-01 Thread John Fox
Dear Allen, On Wed, 1 Apr 2009 10:44:33 -0700 (PDT) AllenL wrote: > > Dear R list, > I've been attempting to interpret the results from a three-way ANOVA. > I > think I understand contrasts and the R defaults for these (treatment > contrasts). My question is: what is the intercept in this test?

Re: [R] A query about na.omit

2009-04-01 Thread Bernardo Rangel Tura
On Wed, 2009-04-01 at 16:49 +0100, Jose Iparraguirre D'Elia wrote: > Dear all, > > Say I have the following dataset: > > > DF > x y z > [1] 1 1 1 > [2] 2 2 2 > [3] 3 3NA > [4] 4 NA 4 > [5] NA 5 5 > > And I want to omit all the rows whi

Re: [R] list substring

2009-04-01 Thread Wacek Kusnierczyk
calpeda wrote: > thank you, > but I m importing data from a txt file and I have a matrix of n*1 > The function str seems to work only from 1*n > > you see, it would help if you provided more details from the start. you may still need to do it; it seems that both solutions you were given (mine

[R] Public R servers?

2009-04-01 Thread Aaron Barzilai
Hello, Earlier I posted a question about memory usage, and the community's input was very helpful. However, I'm now extending my dataset (which I use when running a regression using lm). As a result, I am continuing to run into problems with memory usage, and I believe I need to shift to impl

Re: [R] Variable Wildcard Value

2009-04-01 Thread Rolf Turner
This whole thing is an April Fool's joke. Isn't it? ***Please***!!! (Let it be an April Fool's joke.) cheers, Rolf Turner ## Attention:\ This e-mail message is privileged and confid...{{dropped:9}}

[R] Plotting a time series

2009-04-01 Thread Thomas Adams
I have data that I read in using: data<-read.table("RAVK2.obs.data",sep="\t") 'data' looks like this: V1V2 1 2009-03-25 06:00:00 12.86 2 2009-03-25 12:00:00 12.80 3 2009-03-25 18:00:00 12.76 4 2009-03-26 00:00:00 12.68 5 2009-03-26 06:00:00 12.66 6 2009-03-26 12:00:

[R] feature selection problem,urgent help need

2009-04-01 Thread Azade Mohammadi
Hello, I have a problem in feature selection I would be thankful if you can help me. I have a dataset with limited samples (for example 100) and a lot of features (for example 3000) and i have to do feature selection. if i use cross validation (for example *10 fold*) i rank the features based on 9

[R] Bootstrap Confidence Intervals

2009-04-01 Thread Mokhles Rekaby
How can I performing Bootstrap Confidence Intervals for the estimates of nonparametric regression y=f(x) such as loess and spline smoothing Thanks in advance [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https

[R] Plotting multiple ablines

2009-04-01 Thread Thomas Levine
I really want to do this: abline( a=tan(-kT*pi/180), b=kY-tan(-kT*pi/180)*kX ) where kX,kY and kT are vectors of equal length. But I can't do that with abline unless I use a loop, and I haven't figured out the least unelegant way of writing the loop yet. So is there a way to do this without a loo

[R] SNOW: Error in socketSelect(socklist) : not a socket connection

2009-04-01 Thread Ubuntu Diego
I'm trying to use snow in my dual-core (hopefully later this is going to run in a cluster). So, at this moment I create a cluster using SOCK connection (MPI in the future). However when I try to use clusterApplyLB I got "Error in socketSelect(socklist) : not a socket connection". Any ideas ? Do you

[R] Lattice plot with an extra strip showing group weights

2009-04-01 Thread Jesse Y Cai
Dear r-help, How can I add a strip to show group weights using lattice package? For example, in the following code, I'd like to using "wt" variable in a trip to demonstrate the relative size of groups. (Following is just the simplest form to demonstrate the question. A conditional variable will

[R] Noobie ANOVA intercept question

2009-04-01 Thread AllenL
Dear R list, I've been attempting to interpret the results from a three-way ANOVA. I think I understand contrasts and the R defaults for these (treatment contrasts). My question is: what is the intercept in this test? As far as I can tell, its NOT the expected value of a point that belongs to the

[R] Recommended packages for a statistician

2009-04-01 Thread Eamonn O'Brien
The company I work for require users to request what packages they want from the IT department (user cannot download themselves). I intend to request installation of the latest version of R plus the 23 Cran task views. As a statistician what are the recommended packages or packages that statisticia

Re: [R] A query about na.omit

2009-04-01 Thread Gabor Grothendieck
First input the data frame: > Lines <- "x y z +1 1 1 +2 2 2 +3 3NA +4 NA 4 + NA 5 5" > > DF <- read.table(textConnection(Lines), header = TRUE) > # Now uses complete.cases to get required rows: > > DF[complete.cases(DF[1:2]),] x y z 1

Re: [R] Latex symbols in R (\perp and \parallel)

2009-04-01 Thread Dieter Menne
Lorenzo Isella wrote: > > I am sure this is a one-liner, but I cannot find the R command to > generate the LaTex symbols \perp and \parallel. > As often, the most helpful "how-to" resource is by Prof. Brian Ripley http://markmail.org/thread/kauzftprydrhqq5m if you manage to get around the ma

Re: [R] A query about na.omit

2009-04-01 Thread Ted Harding
On 01-Apr-09 15:49:40, Jose Iparraguirre D'Elia wrote: > Dear all, > Say I have the following dataset: > >> DF > x y z > [1] 1 1 1 > [2] 2 2 2 > [3] 3 3NA > [4] 4 NA 4 > [5] NA 5 5 > > And I want to omit all the rows which have NA, but o

[R] Vector of Vectors

2009-04-01 Thread Shawn Garbett
I have a matrix of data. I need to scan the matrix and find every sequence from maxima to maxima across a row. I can write a loop to do this easily. Problem is, I can't figure out how to store the results. Each result is a vector of widely varying lengths. Ideally I'd like a vector of these

Re: [R] Help with mixed-effects model with temporal pseudoreplication!

2009-04-01 Thread Dieter Menne
Bugzilla from rmh3...@gmail.com wrote: > > Responses: > CompletionTIme > VisitedTargets > > Fixed-factors: > Targets (4-levels): 4, 9, 14, 19 > Entropy (3-levels): Low, Medium, High > > Random-factors: > Participants: 31 total participants > Replicates: 5 (this could also be viewed as a time

Re: [R] Definition of = vs. <-

2009-04-01 Thread Duncan Murdoch
On 4/1/2009 11:39 AM, Stavros Macrakis wrote: On Wed, Apr 1, 2009 at 10:55 AM, Duncan Murdoch wrote: On 4/1/2009 10:38 AM, Stavros Macrakis wrote: As far as I can tell from the documentation, assignment with = is precisely equivalent to assignment with <-. Yet they call different primitives:

Re: [R] Fit unequal variance model in R

2009-04-01 Thread Dieter Menne
Feng, Jingyu wrote: > > I'am trying to develop some code if R, which would correspond to what I > did in SAS. > The data look like: > > TreatmentReplicategroup1 GSI > > .. > The SAS code is: > proc mixed data=data_name order=data method=ml; *scoring=10; > classes group1; >

Re: [R] Deriving Samples from specific, not implemented PDF for a QQ-Plot

2009-04-01 Thread Arndt Zimmermann
David, thank you very much for the quick response: The "sample" example helped and works fine for me. I'm sorry for not providing an example. In order to explain my problem see following example: test<-rt(1000,df=5) Repeat only the following code to see how the second and third plot cha

[R] Latex symbols in R (\perp and \parallel)

2009-04-01 Thread Lorenzo Isella
Dear All, I am sure this is a one-liner, but I cannot find the R command to generate the LaTex symbols \perp and \parallel. Consider for instance the figure (one can use any kind of data for the plot) pdf("friction_linear_chain_perpendicular.pdf") par( mar = c(4.5,5, 2, 1) + 0.1) plot(data[ ,1],

Re: [R] Calculating First Occurance by a factor

2009-04-01 Thread hadley wickham
On Wed, Apr 1, 2009 at 11:00 AM, hadley wickham wrote: >> I tried messing with the line df$FixTime[which.min(df$FixInx)] changing it >> to df[which.min(df$FixInx)] or adding new lines with the additional columns >> that I want to include, but nothing seemed to work. I'll admit I only have a >> mil

Re: [R] Calculating First Occurance by a factor

2009-04-01 Thread hadley wickham
> I tried messing with the line df$FixTime[which.min(df$FixInx)] changing it > to df[which.min(df$FixInx)] or adding new lines with the additional columns > that I want to include, but nothing seemed to work. I'll admit I only have a > mild understanding of what is going on with the function .fun.

Re: [R] Calculating First Occurance by a factor

2009-04-01 Thread jwg20
I have another question regarding ddply. In my actual data.frame, I have many other column variables corresponding to the type of the trial. I'm wondering if I can have ddply include those in firstfixtime as well. I tried messing with the line df$FixTime[which.min(df$FixInx)] changing it to df[wh

[R] Help with mixed-effects model with temporal pseudoreplication!

2009-04-01 Thread Ryan Hope
Sorry if this is the wrong ml for this question, I am new to R. I am trying to use R to analyze the data from my thesis experiment and I am having troubles accounting for the pseudoreplication properly from having each participant repeat each treatment combination (combination of fixed factors) 5 t

[R] A query about na.omit

2009-04-01 Thread Jose Iparraguirre D'Elia
Dear all, Say I have the following dataset: > DF x y z [1] 1 1 1 [2] 2 2 2 [3] 3 3NA [4] 4 NA 4 [5] NA 5 5 And I want to omit all the rows which have NA, but only in columns X and Y, so that I get: x y z 1 1 1 2 2 2 3 3 NA

[R] Fit unequal variance model in R

2009-04-01 Thread Feng, Jingyu
I'am trying to develop some code if R, which would correspond to what I did in SAS. The data look like: TreatmentReplicategroup1 GSI Control A 1 0.81301 Control B 1 1.06061 Control C 1 1.26350 Control

[R] Still confused about R method of data exchanging between caller and called function

2009-04-01 Thread mauede
First of all I'd like to thank all those who answered me back teaching me different ways to get the calledfunction modify global data rather than its own. I fixed that. Now I have a similar pproblem. Whenever the caller passes a matrix to the called function I thought the called function would

[R] Odp: Fwd: 'for Loop'

2009-04-01 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 01.04.2009 11:16:26: > Hello, > > A nice guy call Jun Shen was helping me out with this, but I require a bit > more help. Below is my data set or list called 'test'. I'm trying to calculate > the %RSD for each pair of index and keep it in cronologica

Re: [R] Definition of = vs. <-

2009-04-01 Thread Stavros Macrakis
On Wed, Apr 1, 2009 at 10:55 AM, Duncan Murdoch wrote: > On 4/1/2009 10:38 AM, Stavros Macrakis wrote: > >> As far as I can tell from the documentation, assignment with = is >> precisely >> equivalent to assignment with <-. Yet they call different primitives: >> > > The parser does treat them dif

Re: [R] Definition of = vs. <-

2009-04-01 Thread Martin Morgan
Duncan Murdoch writes: > On 4/1/2009 10:38 AM, Stavros Macrakis wrote: >> NOTA BENE: This email is about `=`, the assignment operator (e.g. {a=1} >> which is equivalent to { `=`(a,1) } ), not `=` the named-argument syntax >> (e.g. f(a=1), which is equivalent to >> eval(structure(quote(f(1)),names

Re: [R] Learning development concepts in R for newbie users

2009-04-01 Thread markleeds
Hi: I have had a similar issue so below are ways that I deal with that.  i don't think there are manuals/ documentation for becoming more of a developer ( someone can correct me if I'm wrong and I'd be happy to be wrong ) but there are other ways: 1) Staying on this list

[R] Package tcltk

2009-04-01 Thread Rita Sousa
Hi, When I type library("tcltk") under R 2.8.1 I get the error message: Loading Tcl/Tk interface ...Error in inDL(x, as.logical(local), as.logical(now), ...) : unable to load shared library 'C:/PROGRA~1/R/R-28~1.1/library/tcltk/libs/tcltk.dll': LoadLibrary failure: The specified module co

Re: [R] list substring

2009-04-01 Thread calpeda
thank you, but I m importing data from a txt file and I have a matrix of n*1 The function str seems to work only from 1*n Wacek Kusnierczyk wrote: > > calpeda wrote: >> hi >> I ve a list of item x = ( "x1" >>"x2" >>"

[R] smv() in "e1071" and the BreastCancer data from "mlbench"

2009-04-01 Thread Brandon . J . Whitcher
R-help, I am trying to perform a basic anlaysis of the BreastCancer data from "mlbench" using the svm() function in "e1071". I use the following code library("e1071") library("mlbench") data(BreastCancer) BC <- subset(BreastCancer, select=-Id) pairs(BC) model <- svm(Class ~ ., data=BC, cross=1

[R] CORRECTION: Re: Multicollinearity with brglm?

2009-04-01 Thread woodbomb
I'm running brglm to do binomial loguistic regression. The perhaps multicollinearity-related feature(s) are: (1) the k IVs are all binary categorical, coded as 0 or 1; (2) each row of the IVs contains exactly C (< k) 1's; (I think this is the source of the problem) (3) there are n * k unique r

[R] Discriminant analyse

2009-04-01 Thread Benedikt Niesterok
Hi everyone, I intend to do a discriminant analyse for 2 measures(eye diameter and body length) and for different areas to show differences between those areas if there are any. The raw data (eye diameter, body length) make one cloud of points so it seems there aren't any differences between tho

Re: [R] Definition of = vs. <-

2009-04-01 Thread Duncan Murdoch
On 4/1/2009 10:38 AM, Stavros Macrakis wrote: NOTA BENE: This email is about `=`, the assignment operator (e.g. {a=1} which is equivalent to { `=`(a,1) } ), not `=` the named-argument syntax (e.g. f(a=1), which is equivalent to eval(structure(quote(f(1)),names=c('','a'))). As far as I can tell f

Re: [R] Need Advice on Matrix Not Positive Semi-Definite with cholesky decomposition

2009-04-01 Thread Gottlieb, Neil
Hi Stephen: It's the inputs given to me by a end-user. Ultimately trying to fit a student-t copula to a bunch of simulated price returns while maintaining the structure of the estimated correlation matrix. The other challenge is I use R to test and work a solution but then have also done in mat

Re: [R] Need Advice on Matrix Not Positive Semi-Definite with cholesky decomposition

2009-04-01 Thread sten...@go.com
Neil, pls tell why do you need the correlation matrix? if you are trying to simulate correlated variables then you can go around the cholesky by using svd. if you really need the correlation ( I think it is always possible to avoid it ) then Rmetrics have a function to turn yo

[R] Learning development concepts in R for newbie users

2009-04-01 Thread Harsh
Hi R users, I apologize for a seemingly trivial question, but I felt this forum would be the best place to seek advice. I have been an R user for a year now, but I am limited to using R and its various contributed packages. I strongly feel that users of a free and open source software tool must e

[R] Definition of = vs. <-

2009-04-01 Thread Stavros Macrakis
NOTA BENE: This email is about `=`, the assignment operator (e.g. {a=1} which is equivalent to { `=`(a,1) } ), not `=` the named-argument syntax (e.g. f(a=1), which is equivalent to eval(structure(quote(f(1)),names=c('','a'))). As far as I can tell from the documentation, assignment with = is prec

Re: [R] Need Advice on Matrix Not Positive Semi-Definite with cholesky decomposition

2009-04-01 Thread Ravi Varadhan
Look at the nearPD() function in the package "Matrix". require(Matrix) ?nearPD In particular, pay attention to the arguments "eig.tol" and "posd.tol", which you can tweak to define how much "positiveness" you would like to have. Ravi. --

Re: [R] Constrined dependent optimization.

2009-04-01 Thread rkevinburton
Thank you I had not considered using "gradient" in this fashion. Now as an add on question. You (an others) have suggested using SANN. Does your answer change if instead of 100 "variables" or bins there are 20,000? From the documentation L-BFGS-B is designed for a large number of variables. But

Re: [R] list substring

2009-04-01 Thread Jorge Ivan Velez
Dear celpeda, Try this: x = c( "x1", "x2", "x3") substr(x,1,4) [1] "" "" "" See ?substr for more details. HTH, Jorge On Wed, Apr 1, 2009 at 9:30 AM, calpeda wrote: > > hi > I ve a list of item x = ( "x1" > "x2" >

  1   2   >