[R] data type problem for vegan package

2008-11-11 Thread keunhchoi
Dear all, I'm using R2.8 version, and am trying to do NMDS and calculate other diversity indices in vegan package. The problem is that it works with a small set of data (43 X 23; row by column), but the following error message comes up with a larger data set (43 X 104) (it seems not large to me a

Re: [R] comparing rows - a possible solution

2008-11-11 Thread Oliver Bandel
Hi, Zitat von [EMAIL PROTECTED]: > Hi Oliver: if I understood Chris's email correctly , he wanted to > compare all possible row ( row1 with the other 4 rows of the other > matrix, > row 2 with the 4 rows of the other matrix, etc, etc, ) combinations > of > the two matrices, Oh, I thought he mean

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Wacek Kusnierczyk
Gabor Grothendieck wrote: > > but I think R is stuck with what it has due to compatibility and the large > base of users yet its still possible to add functions in packages or new > functions to R so a new variant of subset would be possible in which > case one could decide to use the new function

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Wacek Kusnierczyk
Gabor Grothendieck wrote: > > Regarding the convenience it occurs in expressions like this: > >iris2 <- subset(iris, select = - Species) > > to create a data frame without the Species column. > aha! so what's you best guess about the result here: d = data.frame(a = 1) d$`-b` = 2 names(d)

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Gavin Simpson
On Tue, 2008-11-11 at 09:49 +0100, Wacek Kusnierczyk wrote: > Gabor Grothendieck wrote: > > > > Regarding the convenience it occurs in expressions like this: > > > >iris2 <- subset(iris, select = - Species) > > > > to create a data frame without the Species column. > > > > aha! so what's y

Re: [R] data type problem for vegan package

2008-11-11 Thread Gavin Simpson
Hi Keun-Hyung, Can you send the data (off list) to me or at least show what str(gh1) produces, and show us the output from require(vegan) sessionInfo() Without that it is difficult to help. G On Tue, 2008-11-11 at 17:19 +0900, [EMAIL PROTECTED] wrote: > Dear all, > > I'm using R2.8 version,

Re: [R] read SAS file

2008-11-11 Thread Peter Dalgaard
b g wrote: > I must have this file in the wrong directory. I can see it and it's spelled correctly in my command (including case) but I get: > >> library(foreign)> read.xport("cft2008R") Error in lookup.xport(file) >> : unable to open file: 'No such file or directory'> There are several subdirect

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Wacek Kusnierczyk
Berwin A Turlach wrote: > On Tue, 11 Nov 2008 09:27:41 +0100 > Wacek Kusnierczyk <[EMAIL PROTECTED]> wrote: > > >> but then it might be worth asking whether carrying on with misdesign >> for backward compatibility outbalances guaranteed crashes in future >> users' programs, [...] >> > > Why

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Wacek Kusnierczyk
Gavin Simpson wrote: > >> d = data.frame(a = 1) >> d$`-b` = 2 >> names(d) >> # here we go >> >> subset(d, select = -b) >> # to b or not to b? >> > > but -b is not the name of the column; you explicitly called it `-b` and > you should refer to it as such. If you use "non-standard" names then >

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Wacek Kusnierczyk
Gavin Simpson wrote: > On Tue, 2008-11-11 at 11:08 +0100, Wacek Kusnierczyk wrote: > >> Gavin Simpson wrote: >> d = data.frame(a = 1) d$`-b` = 2 names(d) # here we go subset(d, select = -b) # to b or not to b? >>> but -b is not the

Re: [R] Manipulation in timeSeries object:how to use the function "applySeries" by daily?

2008-11-11 Thread stephen sefick
take a look at aggregate.zoo in the zoo package good luck Stephen On Mon, Nov 10, 2008 at 9:57 PM, tedzzx <[EMAIL PROTECTED]> wrote: > > Hi all > I have some tick-by-tick data and I have calculated the intraday returns. I > want to sum up the intraday squared returns to calculate the daily > vola

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Wacek Kusnierczyk
Duncan Murdoch wrote: > On 11/11/2008 8:53 AM, hadley wickham wrote: >> On Mon, Nov 10, 2008 at 1:04 PM, Wacek Kusnierczyk >> <[EMAIL PROTECTED]> wrote: >>> pardon me, but does this address in any way the legitimate complaint of >>> the rightfully confused user? >>> >>> consider the following: >>>

[R] A R forum for sub-saharan African R user

2008-11-11 Thread justin bem
Dear all, I have create a new forum for all SSA R users. The forum link is http://aurass.forum-free.org The forum language is french beacuse many people in SSA speak french. I hope that the forum will contribute to increase the number of R user in SSA because many companies in SSA fall in th

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread hadley wickham
> I think your analysis is correct, that the goals of casual use and > programming are inconsistent. But in general I think there's always going > to be support for providing alternative ways that are programmer-safe. > > For instance, library( foo, character.only=TRUE) says that foo is a > charac

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Gavin Simpson
On Tue, 2008-11-11 at 15:54 +0100, Wacek Kusnierczyk wrote: > > Have you tried? But bear in mind that R Core has more to balance that > > just whether you think a design "flaw" or infelicity etc should be fixed > > when it decides whether to accept patches. > > > > my whole posting is an attem

Re: [R] Question about Sort

2008-11-11 Thread Prof Brian Ripley
On Tue, 11 Nov 2008, Wen Huang wrote: Hi, I am wondering if there is an option to control how R sort characters on different machines. Yes, and it is described on the help page for sort: The sort order for character vectors will depend on the collating sequence of the locale in us

Re: [R] Question about Sort

2008-11-11 Thread Wen Huang
Thanks a lot Professor Ripley! I did not go into much of the details in the help page and was hoping somebody could have a quick answer. The answer you provided is indeed helpful! Thank you. On Nov 11, 2008, at 10:40 AM, Prof Brian Ripley wrote: On Tue, 11 Nov 2008, Wen Huang wrote: Hi

Re: [R] Reading tables using a truncated name

2008-11-11 Thread hadley wickham
?dir Hadley On Tue, Nov 11, 2008 at 11:06 AM, <[EMAIL PROTECTED]> wrote: > Dear all, > > I am trying to read a bunch of csv files using read.table() that are named > "test_xx.csv" where "xx" has no particular pattern. Is there a way > of reading all the files by specifying a truncated fi

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Berwin A Turlach
G'day Duncan, On Tue, 11 Nov 2008 09:37:57 -0500 Duncan Murdoch <[EMAIL PROTECTED]> wrote: > I think this tension is a fundamental part of the character of S and > R. But it is also fundamental to R that there are QC tests that apply > to code in packages: so writing new tests that detect danger

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Wacek Kusnierczyk
Gavin Simpson wrote: > > I've found several of these discussions involving Wacek's questions very > enlightening at times; once you get past the "it doesn't work as I > expect so is wrong" attitude. > just one fix: my attitude is 'it doesn't work as i imagine an average user would expect it s

Re: [R] simulate data with binary outcome and correlated predictors

2008-11-11 Thread Greg Snow
You could generate all the data as continuous using the idea below, then use the cut function to change some of the normal continuous variables into binary or ordinal variables. It is less clear exactly what the correlation means in this case, but the variables would still have a relationship.

Re: [R] how to export results of rcorr into excel

2008-11-11 Thread Dieter Menne
shixin hotmail.com> writes: > > I try to export the outputs of rcorr into excel. but I got error message,"cannot coerce class "rcorr" into a > data.frame". Actually i just need export part of results of this analysis,e.g. p-values or stat-values. library(Hmisc) x <- c(-2, -1, 0, 1, 2) y <- c(4,

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Wacek Kusnierczyk
Gavin Simpson wrote: > >> my whole posting is an attempt, may you try to notice. >> >> vQ >> > > Did you read what you wrote. And you still wonder why you get little > response from certain quarters? > > 1) Don't say "no further comment" - that is quite arrogant to think that > you are right a

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Peter Dalgaard
Berwin A Turlach wrote: > G'day Duncan, > > On Tue, 11 Nov 2008 09:37:57 -0500 > Duncan Murdoch <[EMAIL PROTECTED]> wrote: > >> I think this tension is a fundamental part of the character of S and >> R. But it is also fundamental to R that there are QC tests that apply >> to code in packages: so

[R] Question about Sort

2008-11-11 Thread Wen Huang
Hi, I am wondering if there is an option to control how R sort characters on different machines. For example, on my Mac OS X > sort(c("H", "a"), decreasing = TRUE) [1] "a" "H" The same command on a Linux machine gives me > sort(c("H", "a"), decreasing = TRUE) [1] "H" "a" I don't know if th

Re: [R] ubuntu system refuses to update packages

2008-11-11 Thread Leon Yee
Vincent Goulet wrote: It seems that R2.8.0 for gutsy is built on a system with tcl8.5 and tk8.5, which is not available in gutsy? From the CRAN Ubuntu README: >>> Installation and compilation of R or some its packages may require Ubuntu packages from the "backports" repositories. In parti

[R] Correcting for covariate (unbalanced design)

2008-11-11 Thread Renaud Gaujoux
Hi, I've got a microarray dataset (Illumina) coming from a blood assay with a case-control factor of interest. I also have several other covariates (gender, weight, etc...). I know that the experimental design is highly unbalanced with respect to Gender: female male control

Re: [R] Multiple XY Lines Plot

2008-11-11 Thread Philipp Pagel
> Hi list, I?m trying to plot lines in the same graphic. There are lots of > similar topic on the list history. I?ve read about xyplot (lattice) and > other ways to do that but I only got complex error messages, and wasn?t able > even to start a decent R scrip. There are several ways to plot multi

Re: [R] in R when I get negative adjusted R^2 using "lm", what might be the problem?

2008-11-11 Thread Peter Dalgaard
Tom Backer Johnsen wrote: > Greg Snow wrote: >> No problem, adjusted R-squared can be negative. If there truly is no >> relationship, then the adjusted R-squared should average to 0, so >> sometimes it must be negative. All of your R-squared and adjusted >> R-squared values suggest that there is

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread hadley wickham
On Mon, Nov 10, 2008 at 1:04 PM, Wacek Kusnierczyk <[EMAIL PROTECTED]> wrote: > pardon me, but does this address in any way the legitimate complaint of > the rightfully confused user? > > consider the following: > > d = data.frame(a=1, b=2) > a = c("a", "b") > z = a > # that is, both a and z are c(

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Gavin Simpson
On Tue, 2008-11-11 at 08:14 -0600, hadley wickham wrote: > > And without wanting to be rude or anything, your opinion carries very > > little weight in a project like R. You've arrived on the list and been > > very critical of the work of others. Now there is nothing wrong with > > being critical i

Re: [R] Preparing data for display

2008-11-11 Thread Stavros Macrakis
On Mon, Nov 10, 2008 at 9:32 PM, jim holtman <[EMAIL PROTECTED]> wrote: > Have you tried 'do.call(rbind,)'? Thanks for the suggestion! This works nicely. Another member of the list also suggested this approach (in private mail). Another useful suggestion was matplot. I'm still working on mas

Re: [R] Manipulation in timeSeries object:how to use the function "applySeries" by daily?

2008-11-11 Thread Jeff Ryan
Take a look at xts, a time series class that extends zoo and is compatible (forward and backwards) with all major time-series classes, including timeSeries from Rmetrics. It has a few functions that may be of interest: ?endpoints ?period.apply It may also be useful to use the Fortran-based aggr

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Wacek Kusnierczyk
Berwin A Turlach wrote: > On Tue, 11 Nov 2008 09:49:31 +0100 > Wacek Kusnierczyk <[EMAIL PROTECTED]> wrote: > > >> (for whatever reason a user may choose to have a column named '-b') >> > > For whatever reason, people also jump from bridges. Does that mean > all bridges have an inherently

Re: [R] Rmpi task-pull

2008-11-11 Thread Daniel Ferrara
Thanks for your help! Strangely this code (it's not mine), seems to cause deadlock over my cluster, even if every node of the cluster is tested working. Anyway I tried a task pull method and that seems to work. Thanks again, Daniel 2008/11/7 Markus Schmidberger <[EMAIL PROTECTED]> > Hi, > > ther

[R] Multiple XY Lines Plot

2008-11-11 Thread Rodrigo Aluizio
Hi list, I’m trying to plot lines in the same graphic. There are lots of similar topic on the list history. I’ve read about xyplot (lattice) and other ways to do that but I only got complex error messages, and wasn’t able even to start a decent R scrip. Well I have some paired information (each H W

[R] RES: Multiple XY Lines Plot

2008-11-11 Thread Rodrigo Aluizio
Philipp you actually solved my problem when you mentioned matplot function. I hadn't read anything about it before, when you mentioned I searched and I'm getting what I need, now it's just a question of minor adjustments. Below is a simple solution that I will now improve. matplot(Perfil$3.W,Perf

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 11.11.2008 11:32:27: > Berwin A Turlach wrote: > > On Tue, 11 Nov 2008 09:27:41 +0100 > > Wacek Kusnierczyk <[EMAIL PROTECTED]> wrote: > > > > > >> but then it might be worth asking whether carrying on with misdesign > >> for backward compatibility outbalances gua

Re: [R] Plot matrix

2008-11-11 Thread Henrique Dallazuanna
See ?matplot On Tue, Nov 11, 2008 at 10:31 AM, mentor_ <[EMAIL PROTECTED]> wrote: > > Hi, > > I would like to plot the rows of a matrix. > Is there a better way as doing it in the following way?: > > plot(matrix[1,], type="l") > for (i in 2:dim(matrix)[1]) { >lines(matrix[i,], type="l") >

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Wacek Kusnierczyk
Berwin A Turlach wrote: > On Tue, 11 Nov 2008 09:27:41 +0100 > Wacek Kusnierczyk <[EMAIL PROTECTED]> wrote: > > >> but then it might be worth asking whether carrying on with misdesign >> for backward compatibility outbalances guaranteed crashes in future >> users' programs, [...] >> > > Why

[R] Truncated multivariate normal distribution

2008-11-11 Thread James Dean Santos Junior
Dear all There is some package with generation of truncated multivariate normal samples? Best regards, -- James Dean Oliveira dos Santos Jr. MsC em Estatística, UNICAMP (2007) BsC em Estatística, UFAM (2004) [[alternative HTML version deleted]]

[R] strsplit (regex)

2008-11-11 Thread stephen sefick
#how do I break these up into first two letters (RM), number, and then the last part #is there an easily accessible regex tutorial on the internet? v = (structure(1:122, .Label = c("RM215Temp", "RM215SpCond", "RM215DO.Conc", "RM215Depth", "RM215pH", "RM215ORP", "RM215Turbidity.", "RM215Battery", "

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Berwin A Turlach
On Tue, 11 Nov 2008 09:49:31 +0100 Wacek Kusnierczyk <[EMAIL PROTECTED]> wrote: > (for whatever reason a user may choose to have a column named '-b') For whatever reason, people also jump from bridges. Does that mean all bridges have an inherently flawed design and should be abolished? Wait, th

[R] spearman metric for hierarchical clustering

2008-11-11 Thread Bernd Jagla
I need to calculate a hierarchical clustering using the spearman metric. Is there such functionality within R, and if so can you give me an example on how to use it? Thanks, Bernd [[alternative HTML version deleted]] __ R-help@r-project

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Gavin Simpson
On Tue, 2008-11-11 at 11:08 +0100, Wacek Kusnierczyk wrote: > Gavin Simpson wrote: > > > >> d = data.frame(a = 1) > >> d$`-b` = 2 > >> names(d) > >> # here we go > >> > >> subset(d, select = -b) > >> # to b or not to b? > >> > > > > but -b is not the name of the column; you explicitly called i

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Thomas Lumley
Some of the uses of non-standard evaluation are undoubtedly a problem in R. Probably the worst is in model.frame, because it is much harder to work around. I have never used subset(,select=) and hence have never been at risk of confusion (if you don't like how it works, I suggest you do the s

Re: [R] spearman metric for hierarchical clustering

2008-11-11 Thread Erik Iverson
package Hmisc, function varclus, see ?varclus after loading the package. Examples also in Harrell's book, "Regression Modeling Strategies". Bernd Jagla wrote: I need to calculate a hierarchical clustering using the spearman metric. Is there such functionality within R, and if so can you give m

[R] Retrieving x argument name from a trellis object in R 2.8.0

2008-11-11 Thread vincenzo . 2 . di-iorio
Dear all, let consider the following function: Fun1 <- function() { library(lattice) plot1 <- 1:10~1:10 pl1 <- xyplot(plot1) return(pl1$call$x) } In R 2.5.0 (or older version) we have > Fun1() plot1 but starting from R 2.5.1 until the latest R 2.8.0 we obtain instead > Fun1() NULL

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Bert Gunter
Ummm... as today is still Armistice day (in my time zone, anyway), maybe we should call a truce and end this flame war... Cheers, Bert -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Berwin A Turlach Sent: Tuesday, November 11, 2008 9:31 AM To: Duncan M

Re: [R] Reading tables using a truncated name

2008-11-11 Thread chibco
Hi all, Thanks everyone for your advice. They have been helpful. Just for the record, I am using ... lapply(dir(path = filePath, pattern = "^test_"), function(x){read.table(file = paste(filePath, x, sep = ""), sep = ",", header = TRUE) } ) to load the files kind regards Chibisi On Tue, Nov

Re: [R] Reading tables using a truncated name

2008-11-11 Thread hadley wickham
Which can be simplified to: paths <- dir(path = filePath, pattern = "^test_", full = T) lapply(paths, read.csv) Hadley On Tue, Nov 11, 2008 at 2:01 PM, <[EMAIL PROTECTED]> wrote: > Hi all, > > Thanks everyone for your advice. They have been helpful. > > Just for the record, I am using ... > > l

Re: [R] RES: Multiple XY Lines Plot

2008-11-11 Thread Philipp Pagel
On Tue, Nov 11, 2008 at 05:11:05PM -0200, Rodrigo Aluizio wrote: > Philipp you actually solved my problem when you mentioned matplot function. > I hadn't read anything about it before, when you mentioned I searched and > I'm getting what I need, now it's just a question of minor adjustments. > > B

Re: [R] standard errors for predict.nls?

2008-11-11 Thread Ben Bolker
Here's how far I've gotten. It's a start, but I can't so far find a way to extract the actual thing we want -- the bootstrap confidence intervals on the predictions. I apologize for not taking the time to go read up on the boot library etc. etc. (I *have* RTFM, but I haven't backtracked to th

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Duncan Murdoch
On 11/11/2008 8:53 AM, hadley wickham wrote: On Mon, Nov 10, 2008 at 1:04 PM, Wacek Kusnierczyk <[EMAIL PROTECTED]> wrote: pardon me, but does this address in any way the legitimate complaint of the rightfully confused user? consider the following: d = data.frame(a=1, b=2) a = c("a", "b") z =

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Duncan Murdoch
On 11/11/2008 2:56 PM, Bert Gunter wrote: Ummm... as today is still Armistice day (in my time zone, anyway), maybe we should call a truce and end this flame war... I haven't seen very many flames -- there have been disagreements, but generally it's been quite civil. Certainly I don't think

Re: [R] [Rd] is.matrix

2008-11-11 Thread Wacek Kusnierczyk
hadley wickham wrote: > On Tue, Nov 11, 2008 at 1:58 PM, Wacek Kusnierczyk > <[EMAIL PROTECTED]> wrote: > >> hadley wickham wrote: >> >>> On Tue, Nov 11, 2008 at 1:42 PM, Wacek Kusnierczyk >>> <[EMAIL PROTECTED]> wrote: >>> >>> hadley wickham wrote: >> |

Re: [R] R design (was "Variable passed to function not used in function in select)

2008-11-11 Thread Rolf Turner
On 12/11/2008, at 4:28 AM, Terry Therneau wrote: I've read the back and forth this morning, and I have to side with Vince. Well, I've read back and forth this morning and I have to side with Berwin Turlach --- whose postings were, I thought, extremely well expressed.

Re: [R] RES: Multiple XY Lines Plot

2008-11-11 Thread Philipp Pagel
> # prepare some example data > x <- 1:25 > df <- data.frame(w1=x, w2=x+0.5, h1=x^2, h2=3*x+1.3) > > # use matplot to graph all data at once > matplot(df[,c('w1','w2')], df[,c('h1','h2')], type='l', lty=c('solid', > 'dotted')) Oh - and matplot uses different line types anyway, so specifying lty

[R] read.table not clearing colClasses

2008-11-11 Thread Skewes,Aaron
I am attempting to created colClasses for several tables, then read only specific columns. There are two different table layouts that I am working with. If I use exclusively one layout, the script works perfectly, but if I mix the layouts, it fails to grab the correct columns form layout that is

[R] building Matrix on Ubuntu intrepid

2008-11-11 Thread Ben Bolker
For what it's worth, I found I had to sudo apt-get install libatlas-base-dev in order to get "libf77blas.so" installed on my system. (Everything had been fine under Hardy.) Is there a new dependency? cheers Ben Bolker __ [email protected]

Re: [R] R design (was "Variable passed to function not used in function in select)

2008-11-11 Thread Terry Therneau
Rolf, Fair comments, mostly. > By and large the difficulties arise only in obscure contexts, when > the user is trying to do something sophisticated. But in the case at hand, the user was doing something simple, and got caught when the function tried to be overly clever. That's rather

[R] Plot matrix

2008-11-11 Thread mentor_
Hi, I would like to plot the rows of a matrix. Is there a better way as doing it in the following way?: plot(matrix[1,], type="l") for (i in 2:dim(matrix)[1]) { lines(matrix[i,], type="l") } Cheers -- View this message in context: http://www.nabble.com/Plot-matrix-tp20438584p20438584.

[R] congratulations, Ross

2008-11-11 Thread Thomas Lumley
from: http://www.royalsociety.org.nz/Site/news/media_releases/2008/honours08full.aspx#90569-36 Pickering Medal To recognise excellence and innovation in the practical application of technology. Awarded by the Royal Society of New Zealand. Awardee: Associate Professor Ross Ihaka, Departmen

[R] [R-pkgs] trip package: version 1.1-2

2008-11-11 Thread Michael Sumner
Hello, A long overdue update to the 'trip' package is now on CRAN. o New function forceConstraints() to impose the common problems found in track data of duplicated records, and duplicated time stamps. o Bug fix to speedfilter() which would never finish for trips of 3 locations. o Clean up of

[R] simulate data with binary outcome and correlated predictors

2008-11-11 Thread Delphine COURVOISIER
Hi, I would like to simulate data with a binary outcome and a set of predictors that are correlated. I want to be able to fix the number of event (Y=1) vs. non-event (Y=0). Thus, I fix this and then simulate the predictors. I have 2 questions: 1. When the predictors are continuous, I can use m

Re: [R] read SAS file

2008-11-11 Thread b g
Figured out the problem reading the file. Csv files must be ftp'd as ascii and xpt files as binary. However, both strategies result in the first few columns being omitted. I'd like to check which variables are on the file, much like proc contents in SAS, but I can't find the command to do th

Re: [R] strsplit (regex)

2008-11-11 Thread Hans W. Borchers
stephen sefick gmail.com> writes: > > #how do I break these up into first two letters (RM), number, and then > the last part > #is there an easily accessible regex tutorial on the internet? For regular expressions, the perl man pages at are quite good and

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Wacek Kusnierczyk
Kenn Konstabel wrote: > > On the other hand, while there may be ground to complain, it may be easier > to make your own version of subset.data.frame and advertise it to everyone: > > sure, but: a) it may actually increase the mess, and reduce portability b) is still vulnerable to the idiosyn

Re: [R] Reading tables using a truncated name

2008-11-11 Thread Dieter Menne
gmail.com> writes: > I am trying to read a bunch of csv files using read.table() that are named > "test_xx.csv" where "xx" has no particular pattern. Is there a way > of reading all the files by specifying a truncated file name e.g. "test_" > with some wild card characters, or would I ha

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Berwin A Turlach
On Tue, 11 Nov 2008 11:27:30 +0100 Wacek Kusnierczyk <[EMAIL PROTECTED]> wrote: > Berwin A Turlach wrote: > > Why is it worth asking this if nobody else asks it? Most notably a > > certain software company in Redmond, Washington, which is famous for > > carrying on with bad designs and bugs all

[R] R design (was "Variable passed to function not used in function in select)

2008-11-11 Thread Terry Therneau
I've read the back and forth this morning, and I have to side with Vince. 1. Functions that re-interpret their arguments are very dangerous. The original question involved a well formed call to a function, which returned the wrong answer. Bug, design flaw, whatever -- it's a mistake and the

Re: [R] R design (was "Variable passed to function not used in function in select)

2008-11-11 Thread Ben Bolker
Rolf Turner auckland.ac.nz> writes: [snip] > > But I think that the best approach would be to include a warning in > the documentation of subset, to the effect: ``There are subtle and > difficult issues involved in the use of this function. If you don't > understand the

[R] data which has different size of elements in each row

2008-11-11 Thread phoebe kong
Hi all, I have problem reading in a text file as follow. The following data has not column header. I tried the following command but failed, temp<-read.table("data.txt",header=F) An error message stated that line 3 did not have 4 elements. 0.293290E-05 0.117772E-05 -0.645205 rs22

[R] msm

2008-11-11 Thread Maura E Monville
I am reading the comprehensive on-line documentation about msm. The positive side is that it seems it has been designed for biomedical statistics, like Clinical Trials. The bad side is that it does not seem to model observations sequences that are not independent but instead are autocorrelated, as

Re: [R] read SAS file

2008-11-11 Thread Peter Dalgaard
b g wrote: > Figured out the problem reading the file. Csv files must be ftp'd as ascii > and xpt files as binary. However, both strategies result in the first few > columns being omitted. I'd like to check which variables are on the file, > much like proc contents in SAS, but I can't find th

[R] Apply function

2008-11-11 Thread tedzzx
Hi all I am manipulating a datafram which has 3 variables.Such as: 1 2 3 4 5 6 . . . 200 210 300 I also has a row index: index=c(100,200,250..300) I want to find the sums of first 100 rows, then the sum from row 101 to row 200, then row 201 to row 250... the each end row is indicated by

[R] Odp: Apply function

2008-11-11 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 11.11.2008 06:59:55: > > Hi all > > I am manipulating a datafram which has 3 variables.Such as: > > 1 2 3 > 4 5 6 > . > . > . > 200 210 300 > > I also has a row index: index=c(100,200,250..300) > I want to find the sums of first 100 rows, then the sum fr

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Berwin A Turlach
On Tue, 11 Nov 2008 09:27:41 +0100 Wacek Kusnierczyk <[EMAIL PROTECTED]> wrote: > but then it might be worth asking whether carrying on with misdesign > for backward compatibility outbalances guaranteed crashes in future > users' programs, [...] Why is it worth asking this if nobody else asks it?

[R] Reading tables using a truncated name

2008-11-11 Thread chibco
Dear all, I am trying to read a bunch of csv files using read.table() that are named "test_xx.csv" where "xx" has no particular pattern. Is there a way of reading all the files by specifying a truncated file name e.g. "test_" with some wild card characters, or would I have to laboriously c

Re: [R] data which has different size of elements in each row

2008-11-11 Thread Marc Schwartz
on 11/11/2008 03:39 PM phoebe kong wrote: > Hi all, > > I have problem reading in a text file as follow. > > The following data has not column header. I tried the following > command but failed, > > temp<-read.table("data.txt",header=F) > > An error message stated that line 3 did not have 4 ele

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Kenn Konstabel
On Tue, Nov 11, 2008 at 12:27 PM, Wacek Kusnierczyk < [EMAIL PROTECTED]> wrote: > it's certainly hard to design and implement a system of the size of r. > it's certainly easier to just complain rather than make a better tool. > but it would really be a pitiful world if all of us were just > develo

[R] Accessing Results from cenmle function in NADA package

2008-11-11 Thread Tom La Bone
The cenmle function is used to fit two sets of censored data and test if they are significantly different. I can print out the results of the analysis on the screen but can't seem to figure out how to access these results in R and assign them to new variables, e.g., assign the slope calculated wit

Re: [R] Updating from an Old to a New version of R

2008-11-11 Thread Erich Neuwirth
On Windows, you also can use Gabor Grothendieck's copydir which is part of his utility set batchfiles available in the "Other" part of CRAN. It copies all packages which are available in a source tree but not available in a target tree from the source tree to the target tree. Then you still have to

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread hadley wickham
> And without wanting to be rude or anything, your opinion carries very > little weight in a project like R. You've arrived on the list and been > very critical of the work of others. Now there is nothing wrong with > being critical if it is constructive, and additionally with something > like R yo

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Duncan Murdoch
On 11/11/2008 5:00 AM, Berwin A Turlach wrote: Radford Neal is also complaining on his blog (http://radfordneal.wordpress.com/) about what he thinks are design flaws in R. Why don't you two get together and design a good substitute without any flaws? Or is that too hard? ;-) I agree with Rad

Re: [R] Reading tables using a truncated name

2008-11-11 Thread Henrique Dallazuanna
Try this: sapply(dir(patt="^test_"), read.table, sep = ";", header = TRUE) On Tue, Nov 11, 2008 at 3:06 PM, <[EMAIL PROTECTED]> wrote: > Dear all, > > I am trying to read a bunch of csv files using read.table() that are named > "test_xx.csv" where "xx" has no particular pattern. Is there

[R] Producing a matrix of values

2008-11-11 Thread Andrew McFadden
I all I am trying to create a matrix for a network diagram: # 1. The following produces two dataframes. The table "place" is a dataframe of all places made from "tra" a tracing table that has the source place and destination place. The table "details" is a dataframe of all source and destination

[R] exponential of a matrix

2008-11-11 Thread Terry Therneau
Is the matrix exponential available in some package? The cannonical reference is "Nineteen dubious ways to take the exponential of a matrix". (Love that title) Terry T. __ [email protected] mailing list https://stat.ethz.ch/mailman/listi

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Wacek Kusnierczyk
Petr PIKAL wrote: > > Well, if somebody does not care what is he/she doing then he/she should > stop immediately. > then many r users should perhaps stop using r. but seriously, when one buys a complicated device one typically reads a quick start guide, and makes intuitive assumptions about

[R] Checks for partial matching (was Re: Variable passed to function not used in function in select=... in subset)

2008-11-11 Thread Prof Brian Ripley
On Tue, 11 Nov 2008, Duncan Murdoch wrote: On 11/11/2008 2:56 PM, Bert Gunter wrote: Ummm... as today is still Armistice day (in my time zone, anyway), maybe we should call a truce and end this flame war... I haven't seen very many flames -- there have been disagreements, but generally i

[R] Citing R in journal articles (or the failure to)

2008-11-11 Thread Peter Dunn
Hi all I was reading a paper recently in which I was surprised to see an R package of mine obviously used, without acknowledgement. Indeed, R itself was used without any acknowledgment. So I contact the author about these issues, who said (in part): Regarding the R packages, I used the "twe

Re: [R] coxph diagnostics plot for shape of hazard function?

2008-11-11 Thread Terry Therneau
> Similarly, when I do plot(zph), B(t) is fairly non-constant. > This isn't inherently a problem for me. I don't need a hard single number > to characterize the shape of the excess risk. However, I'd like to be > able to say > something qualitative about the shape of the excess risk for the predic

Re: [R] Variable passed to function not used in function in select=... in subset

2008-11-11 Thread Berwin A Turlach
On Tue, 11 Nov 2008 12:53:31 +0100 Wacek Kusnierczyk <[EMAIL PROTECTED]> wrote: > but seriously, when one buys a complicated device one typically reads > a quick start guide, and makes intuitive assumptions about how the > device will work, turning back to the reference when the expectations > fai

Re: [R] R design (was "Variable passed to function not used in function in select)

2008-11-11 Thread Peter Dalgaard
Ben Bolker wrote: Sometime soon when I have the time and energy I will start campaigning for an additional "drop" argument to subset that does what one expects (!!??) with subsetted factor variables ... Not that one again! For at least one other value of one, the expectation is the opposit

Re: [R] R design (was "Variable passed to function not used in function in select)

2008-11-11 Thread Ben Bolker
Peter Dalgaard wrote: > Ben Bolker wrote: > >> >> Sometime soon when I have the time and energy I will start >> campaigning for an additional "drop" argument to subset that >> does what one expects (!!??) with subsetted factor variables ... > > Not that one again! For at least one other value o

[R] "NA" in predict(...., prediction.interval=TRUE)

2008-11-11 Thread CCordeiro
Dear Rlist, In my work I frequently use functions: HoltWinters() and predict(). Last week I have installed R 2.8.0 and a problem occurs: # the data serie<-ts(c(3128,3444,3428,3803,3044,3427,3246,3505,3052,3613,3555,3675,3267,3601,3501,3855), frequency = 4, start = c(1987, 1),end=c(1990,4)) serie

Re: [R] problem of unix package installation, following code no response: install.packages("packagename", dependecise=TRUE)

2008-11-11 Thread Yihui Xie
It has nothing to do with your UNIX system. The CRAN mirror at CMU is currently not available. You may choose another mirror. For example, install.packages('SASxport', repos = 'http://cran.cnr.berkeley.edu') Regards, Yihui -- Yihui Xie <[EMAIL PROTECTED]> Phone: +86-(0)10-82509086 Fax: +86-(0)10-

Re: [R] R design (was "Variable passed to function not used in function in select)

2008-11-11 Thread Duncan Murdoch
On 11/11/2008 10:28 AM, Terry Therneau wrote: I've read the back and forth this morning, and I have to side with Vince. 1. Functions that re-interpret their arguments are very dangerous. The original question involved a well formed call to a function, which returned the wrong answer. Bug,

Re: [R] Package msm

2008-11-11 Thread Dieter Menne
Maura E Monville gmail.com> writes: > The bad side is that it does not seem to model observations sequences > that are not independent but instead are autocorrelated. Correct me if I should be sitting on the firehose, but I am eager to hear about any non-trivial Markov Process where events ar

Re: [R] exponential of a matrix

2008-11-11 Thread Peter Dalgaard
Terry Therneau wrote: Is the matrix exponential available in some package? Multiple. At least Matrix and msm. One of Jim Lindsey's too, but I think that's one of the more dubious ones. The cannonical reference is "Nineteen dubious ways to take the exponential of a matrix". (Love that ti

  1   2   >