[R] Odp: how to sample a block

2008-11-10 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 10.11.2008 13:25:41: Hi, I want to sample a block of information. Let's say x is a time series. Using sample(x,5) I get a random sample of length 5 from x. Is it possible to sample consecutive observations, i.e. I sample one observation and also get

Re: [R] as.Data with minutes resolution

2008-11-10 Thread Gabor Grothendieck
You can use chron: library(chron) time1 - c(03/08/08-11:00,03/08/08-11:10) diff(as.chron(time1, %d/%m/%y-%H:%M)) Also you can use POSIXct but in that case be careful about time zones. See R News 4/1. On Mon, Nov 10, 2008 at 7:38 AM, Ronaldo Reis-Jr. [EMAIL PROTECTED] wrote: Hi, I

Re: [R] plotting graph in different device

2008-11-10 Thread ONKELINX, Thierry
First open the device, then plot x11() plot(A5e$ECAB,A5e$EXPEND,type='p',main='Per capita expenditure against economic ability index without liners',xlab='ECAB',ylab='EXPEND',xlim=c(0,150),ylim=c(150,400), col='red',col.axis='blue') HTH, Thierry

[R] how to sample a block

2008-11-10 Thread Spiderschwein
Hi, I want to sample a block of information. Let's say x is a time series. Using sample(x,5) I get a random sample of length 5 from x. Is it possible to sample consecutive observations, i.e. I sample one observation and also get the next 4 observations? Thanks a lot! Martin -- View this

Re: [R] Remove Columns by Name from zoo object

2008-11-10 Thread Gabor Grothendieck
On Mon, Nov 10, 2008 at 12:31 AM, Sean Carmody [EMAIL PROTECTED] wrote: The tricks for removing columns specified by name from data frames such as x$mycol - NULL That only works for data frames since they are based on lists but not for objects like matrix, ts and zoo which are not based on

[R] Postdoc Positions Available at Leiden University The Netherlands

2008-11-10 Thread beukerspkpd
Two Postdoctoral fellows (fulltime) Leiden University, Leiden, The Netherlands Job description TOP Institute Pharma (TI Pharma) has granted our proposal to set up a mechanism-based PK-PD modelling platform. This platform focuses on

Re: [R] ubuntu system refuses to update packages

2008-11-10 Thread Vincent Goulet
Le lun. 10 nov. à 00:45, Leon Yee a écrit : Dirk Eddelbuettel wrote: On 9 November 2008 at 20:35, Alan Jackson wrote: | There must be a simple answer to this. | | I'm running ubuntu gutsy, currently have 2.7.2 loaded, but the update | tools refuse to update it, and don't tell me why. With

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

2008-11-10 Thread Eric Rescorla
Hi, I've been banging my head against the following problem for a while and thought the fine people on r-help might be able to help. I'm using the survival package. I'm studying the survival rate of a population with a preexisting linear-like event rate (there are theoretical reasons to believe

[R] Make one vector from matrix comparison

2008-11-10 Thread Chris82
Hello R-users, I have a little problem. I compare each row of a matrix with each row of another matrix. testmat1 - matrix(c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16), nrow=4) testmat2 - matrix(c(1,2,3,5,5,6,7,8,9,10,11,12,13,14,15,16), nrow=4) Both matrix differs in the last row. Now I create

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

2008-11-10 Thread Karl Knoblick
Hello! I have the problem that in my function the passed variable is not used, but the variable name of the dataframe itself - difficult to explain, but an easy example: TestFunc-function(df, group) {     print(names(subset(df, select=group))) } df1-data.frame(group=G1, visit=V1, value=0.9)

[R] R 2.8. and languageR

2008-11-10 Thread Audrey Bürki Foschini
Hi, I have been using the library languageR in R2.6.0 for some while. I now would like to use new functions of this library (especially plotLMER.fnc) and have downloaded R 2.8.0. Error messages appear when I load the languageR library (I have tried several times on different computers but

[R] SNPassoc, mvtnorm, Absoft FORTRAN to gfortran

2008-11-10 Thread Kacper Zukowski
Hi, I'm using R version 2.6.2 (2008-02-08) and also Absoft Fortran Compiler. I try to install SNPassoc package on SUSE 10.2 but it's require mvtnorm package... * Installing *source* package 'mvtnorm' ... ** libs gcc -std=gnu99 -I/usr/lib64/R/include -I/usr/lib64/R/include -I/usr/local/include

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

2008-11-10 Thread Henrique Dallazuanna
Try this: TestFunc-function(df, group) { return(names(eval(bquote(subset(df1, select = .(group)) } On Mon, Nov 10, 2008 at 1:18 PM, Karl Knoblick [EMAIL PROTECTED]wrote: Hello! I have the problem that in my function the passed variable is not used, but the variable name of the

Re: [R] Odp: how to sample a block

2008-11-10 Thread Petr PIKAL
Peter Dalgaard [EMAIL PROTECTED] napsal dne 10.11.2008 14:05:41: Petr PIKAL wrote: Hi [EMAIL PROTECTED] napsal dne 10.11.2008 13:25:41: Hi, I want to sample a block of information. Let's say x is a time series. Using sample(x,5) I get a random sample of length 5 from x.

Re: [R] Make one vector from matrix comparison

2008-11-10 Thread Jorge Ivan Velez
Hi Chris82, Yes. Try this: testmat1 - matrix(c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16), nrow=4) testmat2 - matrix(c(1,2,3,5,5,6,7,8,9,10,11,12,13,14,15,16), nrow=4) b=NULL for (i in 1:4){ for (j in 1:4){ b - c(b,setequal(testmat1[j,],testmat2[i,])) b } } b HTH, Jorge On Mon, Nov 10, 2008

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

2008-11-10 Thread Gabor Grothendieck
Here are a few things to try: TestFunc1 - get([) TestFunc2 - function(DF, group) DF[group] TestFunc3 - function(...) subset(..., subset = TRUE) On Mon, Nov 10, 2008 at 10:18 AM, Karl Knoblick [EMAIL PROTECTED] wrote: Hello! I have the problem that in my function the passed variable is not

[R] Copula package: How to calculate correlation matrix using 144 variables to denote parameters for normal copula?

2008-11-10 Thread rasti matus
Dears, I calculated correlation matrix using 144 variables with a given function: cor_flows_vec=cor() Then I defined a normal copula with the above correlation matrix myCop=normalCopula(param=cor_flows_vec, dim = 144, dispstr = un) Then I created a multivariate distribution with our defined

[R] Combing xyplot and curve() plot via print

2008-11-10 Thread Afshartous, David
All, I'm trying to put an xyplot and a plot produced via curve() on the same page. It seems that mfrow and layout don't work, and now I'm trying print but that does not work either. Any suggestions much appreciated. Cheers, David p.11 = xyplot(1:10 ~ 1:10) curve(sin, 0,3, ylim=c(-3,3),

Re: [R] Remove empty levels in subset

2008-11-10 Thread Ronaldo Reis-Jr.
Thanks it work perfectly. 2008/11/10 Henrique Dallazuanna [EMAIL PROTECTED] Try this: test2$a - factor(test2$a) On Mon, Nov 10, 2008 at 10:33 AM, Ronaldo Reis-Jr. [EMAIL PROTECTED]wrote: Hi, when I use use subset in a data.frame, all empty levels are maintained in the new table.

Re: [R] question about contrast in R for multi-factor linear regression models?

2008-11-10 Thread Mark Difford
Hi losemind, I understand the resultant lm coefficients for one factors, but when it comes to the interaction term, I got confused. Yes, it is possible to lose your mind on this (so perhaps get a real name). A good friend here is ?dummy.coef In your case (i.e. treatment contrasts), your

Re: [R] Remove empty levels in subset

2008-11-10 Thread Henrique Dallazuanna
Try this: test2$a - factor(test2$a) On Mon, Nov 10, 2008 at 10:33 AM, Ronaldo Reis-Jr. [EMAIL PROTECTED]wrote: Hi, when I use use subset in a data.frame, all empty levels are maintained in the new table. test - data.frame(a=as.factor(rep(c(f1,f2,f3),10)),b=rep(c(1,2,3),10))

Re: [R] R 2.8. and languageR

2008-11-10 Thread Ben Bolker
Audrey Bürki Foschini audrey.buerki at pse.unige.ch writes: I now would like to use new functions of this library (especially plotLMER.fnc) and have downloaded R 2.8.0. Error messages appear when I load the languageR library (I have tried several times on different computers but this

Re: [R] Get Information

2008-11-10 Thread Greg Snow
Your code creates the menu that will run the cascade function. The cascade function gets a name from the user to save, but you don't do anything with the name other than return it, and the code that calls cascade does nothing with the return value. If you want the text in the text window

[R] Labeling points with xYplot

2008-11-10 Thread John Poulsen
Hello R-Users, I am trying to label points on an xYplot. I can label the points, but then I lose the error bars. I suspect that I should be using panel.xYplot rather than panel.xyplot, but that didn't work either... Can anybody help me out? Example code is below. First xYplot has error

[R] Regarding lme functions

2008-11-10 Thread ratna ghosal
Hi all, I recently got accquainted with the R stats and using the 'lme' function for some of my analyses. Since I am a novice, I am facing a lot of problems regarding the analyses. I have applied the Linear Mixed Effect model for my dataset and would like to know the commands for extracting the

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

2008-11-10 Thread Duncan Murdoch
On 11/10/2008 10:18 AM, Karl Knoblick wrote: Hello! I have the problem that in my function the passed variable is not used, but the variable name of the dataframe itself - difficult to explain, but an easy example: TestFunc-function(df, group) { print(names(subset(df, select=group))) }

[R] rimage don't install on mac OS X 10.5.5 solved

2008-11-10 Thread Florencio Gonzalez Blazquez
Hello i resolve the installation of the package rimage following the indications by Andy Jacobson in the list [EMAIL PROTECTED] the trick is using R CMD INSTALL --configure-vars='LDFLAGS=-L/sw/lib CPPFLAGS=-I/sw/include' rimage_0.5-7.tar.gz the packages fftw2.1.5 and libjpeg were installed

[R] Re : Regarding lme functions

2008-11-10 Thread justin bem
in nlme package you the intervals function. myfit-lme(...) intervals(myfit) Justin BEM BP 1917 Yaoundé Tél (237) 99597295 (237) 22040246 De : ratna ghosal [EMAIL PROTECTED] À : r-help@r-project.org Envoyé le : Lundi, 10 Novembre 2008, 17h51mn 51s Objet

[R] comparing rows

2008-11-10 Thread markleeds
hi chris: i'm betting that there is a better/shorter more R'ish way to do it ( if someone could provide that, it's appreciated ) but below will get the output in the format you need. the all function tests whether all the elements are equal so you don't need setequal although i guess it's a

Re: [R] Re : Regarding lme functions

2008-11-10 Thread ratna ghosal
Hi,   Thanks   But then how to interpret the rows and columns   Ratna Ratna Ghosal Research Scholar Centre for Ecological Sciences Indian Institute of Sciences Bangalore-12 --- On Mon, 10/11/08, justin bem [EMAIL PROTECTED] wrote: From: justin bem [EMAIL PROTECTED] Subject: Re : [R]

Re: [R] Re : Regarding lme functions

2008-11-10 Thread ratna ghosal
If I give the following command:   myfit-lme(...) intervals(myfit)  then its returning the following error   Cannot get confidence intervals on var-cov components:Non-positive definite approximate variance-covariance   I would like to extract the confidence interval for the fixed

Re: [R] is there any way to apply mulitiple conditions in subset function

2008-11-10 Thread Prof Brian Ripley
On Mon, 10 Nov 2008, Dieter Menne wrote: Kurapati, Ravichandra (Ravichandra ravichandra.kurapati at alcatel-lucent.com writes: df Session_Setup DCT FwdDataVols_bin counts 761 0 1 1 87162 Subset(df,df$ FwdDataVols_bin30 df$

Re: [R] Combing xyplot and curve() plot via print

2008-11-10 Thread Greg Snow
The xyplot function is a lattice function that uses grid graphics. The curve function is a base graphics function. 'par' and 'layout' work with base graphics, the print idea works with grid graphics. Grid graphics and base graphics don't mix easily. One option is to find a

[R] read SAS file

2008-11-10 Thread b g
Looked at a lot of documentation and listserv postings and still can’t solve this problem. I need to get a SAS dataset into R. I’ve converted it to an .xpt file and when I try to read it I get: read.xport(cft2008R) Error: could not find function read.xport Not sure what I’m doing

Re: [R] Odp: how to sample a block

2008-11-10 Thread Peter Dalgaard
Petr PIKAL wrote: Hi [EMAIL PROTECTED] napsal dne 10.11.2008 13:25:41: Hi, I want to sample a block of information. Let's say x is a time series. Using sample(x,5) I get a random sample of length 5 from x. Is it possible to sample consecutive observations, i.e. I sample one observation and

Re: [R] read SAS file

2008-11-10 Thread Richardson, Patrick
Did you load the foreign library first? Try: library(foreign) read.xport(cft2008R) HTH, Patrick -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of b g Sent: Monday, November 10, 2008 1:29 PM To: r-help@r-project.org Subject: [R] read SAS file Looked

[R] as.Data with minutes resolution

2008-11-10 Thread Ronaldo Reis-Jr.
Hi, I have a vetor os dates with day and hour:minutes. time1 - c(03/08/08-11:00,03/08/08-11:10) time1 - as.Date(time1,%d/%m/%y-%R) summary(time1) Min. 1st Qu. Median Mean 3rd Qu. Max. 2008-08-03 2008-08-03 2008-08-03 2008-08-03 2008-08-03 2008-08-03

Re: [R] read SAS file

2008-11-10 Thread David Huffer
Do you have the foreign package loaded? -- David __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal,

Re: [R] is there any way to apply mulitiple conditions in s ubset function

2008-11-10 Thread Dieter Menne
Kurapati, Ravichandra (Ravichandra ravichandra.kurapati at alcatel-lucent.com writes: df Session_Setup DCT FwdDataVols_bin counts 761 0 1 1 87162 Subset(df,df$ FwdDataVols_bin30 df$ FwdDataVols_bin100 ) but it doesn't work

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

2008-11-10 Thread Wacek Kusnierczyk
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(a, b) subset(d, select=z) # gives two columns, since z is a two element vector whose elements

[R] making shape files into data bases usable within maps

2008-11-10 Thread claudia tebaldi
Hello R-helpers, a while ago I had a question about identifying points on a map belonging to a specific region. I learned at that time that if the region is part of one of the databases in the library maps that is easily done by using the function map.where() -- thanks to Duncan Murdoch for the

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

2008-11-10 Thread Greg Snow
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 not much of a relationship (less without the

Re: [R] read SAS file

2008-11-10 Thread b g
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 subdirectories under

Re: [R] Combing xyplot and curve() plot via print

2008-11-10 Thread Afshartous, David
Thanks. I tried you suggestion and it indeed solves the problem. For the sample code below the appropriate substitute to the curve function is: xv = seq(0, 3, by = .05) yv = sin(xv) yv.new = cos(xv) p.12 = xyplot(yv + yv.new ~ xv, type=l, lty=c(1,5), col=black) On 11/10/08 2:09 PM, Greg

Re: [R] read SAS file

2008-11-10 Thread Erik Iverson
What is the working directory, getwd() ? That's where R will look. give read.xport the full path to your file? YOu might also look at sas.get from the Hmisc package. 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

Re: [R] maptools sunrise sunset function

2008-11-10 Thread Farley, Robert
I have a time zone problem. Running the code provided I get the result in UTC, and a lot of warnings like this: 28: In as.POSIXlt.POSIXct(x, tz) ... : unknwon timezone 'PST' sunrise.set(34.11583, -118.18719, 2008-11-14) sunrise sunset newlon 2008-11-14

Re: [R] read SAS file

2008-11-10 Thread Philipp Pagel
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' R is looking in the current work

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

2008-11-10 Thread Gabor Grothendieck
Certainly this has been recognized as a potential problem: http://developer.r-project.org/nonstandard-eval.pdf however, it is convenient when you are performing an analysis and entering commands directly as opposed to writing a program although possibly the potential ambiguities overshadow the

Re: [R] maptools sunrise sunset function

2008-11-10 Thread stephen sefick
I have looked at the timezone documentation ?POSIXct and can not figure it out maybe it would be good to ask this specifically on the list this function is going to be included in the next update of the package StreamMetabolism Stephen Sefick On Mon, Nov 10, 2008 at 2:20 PM, Farley,

Re: [R] Labeling points with xYplot

2008-11-10 Thread Frank E Harrell Jr
John Poulsen wrote: Hello R-Users, I am trying to label points on an xYplot. I can label the points, but then I lose the error bars. I suspect that I should be using panel.xYplot rather than panel.xyplot, but that didn't work either... Can anybody help me out? Example code is below.

Re: [R] Make one vector from matrix comparison

2008-11-10 Thread Gabor Grothendieck
Try: c(inner(testmat1, testmat2, setequal)) where inner is defined here: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/70762.html On Mon, Nov 10, 2008 at 10:11 AM, Chris82 [EMAIL PROTECTED] wrote: Hello R-users, I have a little problem. I compare each row of a matrix with each row of

Re: [R] Labeling points with xYplot

2008-11-10 Thread John Poulsen
Yes, using panel.xYplot is the best thing to do. I couldn't get it to work, which probably means I was specifying it incorrectly. I would be very happy if someone had an example of how to do it. Thanks again -- John Frank E Harrell Jr wrote: John Poulsen wrote: Hello R-Users, I am trying

[R] TimeZone Help - Finding TimeZone codes

2008-11-10 Thread stephen sefick
I have looked at ?as.POSIXct ?POSIXct and many of the references that are on those pages. I am bewildered with timezones. Is there a way to get what would go into tz= for making a function that uses POSIXct to be able to be used in all of the timezones in just the united states? This is for

Re: [R] maptools sunrise sunset function

2008-11-10 Thread Sebastian P. Luque
On Mon, 10 Nov 2008 11:20:03 -0800, Farley, Robert [EMAIL PROTECTED] wrote: I have a time zone problem. Running the code provided I get the result in UTC, and a lot of warnings like this: 28: In as.POSIXlt.POSIXct(x, tz) ... : unknwon timezone 'PST' sunrise.set(34.11583, -118.18719,

Re: [R] maptools sunrise sunset function

2008-11-10 Thread stephen sefick
library(maptools) sunrise.set - function(lat, long, date, timezone=UTC, num.days=1){ #this needs to be long lat# lat.long - matrix(c(long, lat), nrow=1) day - as.POSIXct(date, tz=timezone) sequence - seq(from=day, length.out=num.days , by=days) sunrise -

Re: [R] Labeling points with xYplot

2008-11-10 Thread David Winsemius
See if this does what you are expecting. xYplot(Cbind(b, b-1.5, b+1.5)~a, ylim=c(0,max(b)+3), panel=function(x,y,...){ panel.xYplot(x,y,subscripts=x,...) panel.superpose(x,y, subscripts=x, groups=x,...) ltext(x=list(1,2,3,4), y=list(13,14,15,16),

Re: [R] Labeling points with xYplot

2008-11-10 Thread John Poulsen
That did it! Thanks for the help!!! -- John David Winsemius wrote: See if this does what you are expecting. xYplot(Cbind(b, b-1.5, b+1.5)~a, ylim=c(0,max(b)+3), panel=function(x,y,...){ panel.xYplot(x,y,subscripts=x,...) panel.superpose(x,y, subscripts=x, groups=x,...)

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

2008-11-10 Thread Gabor Grothendieck
Forgot the name part. Try: TestFunc2 - function(DF, group) names(DF[group]) TestFunc3 - function(...) names(subset(..., subset = TRUE)) TestFunc4 - function(...) eval.parent(names(subset(..., subset = TRUE))) # e.g. df1 - data.frame(group = G1, visit = V1, value = 0.9) TestFunc2(df1, c(group,

Re: [R] maptools sunrise sunset function

2008-11-10 Thread Prof Brian Ripley
On Mon, 10 Nov 2008, Farley, Robert wrote: I have a time zone problem. Running the code provided I get the result in UTC, and a lot of warnings like this: 28: In as.POSIXlt.POSIXct(x, tz) ... : unknwon timezone 'PST' sunrise.set(34.11583, -118.18719, 2008-11-14) sunrise

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

2008-11-10 Thread Wacek Kusnierczyk
Gabor Grothendieck wrote: Certainly this has been recognized as a potential problem: http://developer.r-project.org/nonstandard-eval.pdf however, it is convenient when you are performing an analysis and entering commands directly as opposed to writing a program although possibly the

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

2008-11-10 Thread Tom Backer Johnsen
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 not much of a relationship (less

Re: [R] TimeZone Help - Finding TimeZone codes

2008-11-10 Thread Prof Brian Ripley
See ?Sys.timezone, which help.search(timezone) points you to. On Mon, 10 Nov 2008, stephen sefick wrote: I have looked at ?as.POSIXct That also links to Sys.timezone from the 'tz' argument. ?POSIXct and many of the references that are on those pages. I am bewildered with timezones. Is

Re: [R] maptools sunrise sunset function

2008-11-10 Thread Sebastian P. Luque
On Mon, 10 Nov 2008 15:27:52 -0500, stephen sefick [EMAIL PROTECTED] wrote: library(maptools) sunrise.set - function(lat, long, date, timezone=UTC, num.days=1){ #this needs to be long lat# lat.long - matrix(c(long, lat), nrow=1) day - as.POSIXct(date, tz=timezone) sequence - seq(from=day,

[R] Preparing data for display

2008-11-10 Thread Stavros Macrakis
I have a dataset of about 10^6 rows, each consisting of a timestamp, several factors, a string, some integers, and some floats. I'd like to graph this data in various ways, including straightforward ones (how many events per week over the past year for each of 4 values of some factor), some less

Re: [R] Remove Columns by Name from zoo object

2008-11-10 Thread Sean Carmody
Perfect, works like a charm. Thanks Gabor. Sean. On Mon, Nov 10, 2008 at 11:35 PM, Gabor Grothendieck [EMAIL PROTECTED] wrote: On Mon, Nov 10, 2008 at 12:31 AM, Sean Carmody [EMAIL PROTECTED] wrote: The tricks for removing columns specified by name from data frames such as x$mycol - NULL

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

2008-11-10 Thread Gabor Grothendieck
On Mon, Nov 10, 2008 at 4:17 PM, Wacek Kusnierczyk [EMAIL PROTECTED] wrote: Gabor Grothendieck wrote: Certainly this has been recognized as a potential problem: http://developer.r-project.org/nonstandard-eval.pdf however, it is convenient when you are performing an analysis and entering

[R] comparing rows - a possible solution

2008-11-10 Thread Oliver Bandel
Hello, sorry for posting this independently of the original thread, but it is not that easy to answer to mails, when receiving the r-help as digest... ... The question was: I compare each row of a matrix with each row of another matrix. testmat1 -

[R] Non-parametric pairwise comparisons between related series

2008-11-10 Thread LE PAPE Gilles
How to perform non-parametric pairwise comparisons after a Friedman test performed in Rcmdr, i.e. with series in columns, either to compare different columns to a control or to perform all pairwise comparisons ? Example J1 J2 J3 J4 11 12 22 41 40 41 42 48 15 22 20 20 54 59 63 68 23 29 24

[R] ttda and text-mining

2008-11-10 Thread LE PAPE Gilles
The ttda package was devoted to text-mining. It seems to be no more available. Did the name change ? Are other packages devoted to text-mining ? Many thanks Gilles [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] ttda and text-mining

2008-11-10 Thread Erik Iverson
I don't know the history of the 'ttda' package, so can't comment. However, there is an article on text mining in R using the 'tm' package in the latest issue of R News. LE PAPE Gilles wrote: The ttda package was devoted to text-mining. It seems to be no more available. Did the name change ?

Re: [R] ttda and text-mining

2008-11-10 Thread Gabor Grothendieck
On Mon, Nov 10, 2008 at 1:18 PM, LE PAPE Gilles [EMAIL PROTECTED] wrote: The ttda package was devoted to text-mining. It seems to be no more available. Did the name change ? Are other packages devoted to text-mining ? There is a Natural Language Processing CRAN Task View.

Re: [R] ttda and text-mining

2008-11-10 Thread Hans W. Borchers
LE PAPE Gilles lepape.gilles at neuf.fr writes: The ttda package was devoted to text-mining. It seems to be no more available. Did the name change ? Are other packages devoted to text-mining? The 'ttda' package is deprecated as is noted on the Task View Natural Language Processing. The old

Re: [R] maptools sunrise sunset function

2008-11-10 Thread stephen sefick
try tz=America/Los_Angeles it was three hours before tz=America/New_York On Mon, Nov 10, 2008 at 4:25 PM, Sebastian P. Luque [EMAIL PROTECTED] wrote: On Mon, 10 Nov 2008 15:27:52 -0500, stephen sefick [EMAIL PROTECTED] wrote: library(maptools) sunrise.set - function(lat, long, date,

[R] how to stop without error message?

2008-11-10 Thread Mark.Bravington
Dear list Can anyone suggest a simple way to abort execution like stop(...) does, but without issuing an Error: ... message? I don't want to set 'options( show.error.messages=TRUE)' because I want normal behaviour to resume after this particular stop. (Please reply personally as well as to

[R] Re order matrix columns

2008-11-10 Thread mentor_
Hi, I have found the following thread to reorder a data.frame. I would like to do same regarding a matrix: https://stat.ethz.ch/pipermail/r-help/2008-February/154138.html I achieved this with a for loop and cbind but I think using 'is.element' is much more appropriate. Can anyone help? Cheers

Re: [R] Re order matrix columns

2008-11-10 Thread mentor_
Hi, found a quite simple solution: test a b c d e [1,] 1 11 21 31 41 [2,] 2 12 22 32 42 [3,] 3 13 23 33 43 [4,] 4 14 24 34 44 [5,] 5 15 25 35 45 list - c(b, c, a, e, d) test[,list] mentor_ wrote: Hi, I have found the following thread to reorder a data.frame. I would like

[R] interpreting output from predict.blackboost

2008-11-10 Thread Kirsten Barrett
I would like to use blackboost on a training data set, then use the output to predict a testing dataset, and finally evaluate the errors. An example of the code I have written is the following: train - read.csv (train.csv) test - read.csv (test.csv) boost - blackboost (ogred ~ elev + slope +

Re: [R] how to stop without error message?

2008-11-10 Thread John Fox
Dear Mark, How about something like this? f - function(x){ + if (x 0){ + opt - options(show.error.messages=FALSE) + on.exit(options(opt)) + stop() + } + sqrt(x) + } f(2) [1] 1.414214 f(-2) I hope this helps, John -- John Fox, Professor

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

2008-11-10 Thread Yong Wang
Dear list I am trying installing a package under unix, the command as below works in some case but not some other cases, the primary syndrome is R will stop there with a message: (say I am trying to install the package SASxport) ### Warning in install.packages(SASxport,

[R] interpreting output from predict.blackboost

2008-11-10 Thread Kirsten Barrett
I would like to use blackboost on a training data set, then use the output to predict a testing dataset, and finally evaluate the errors. An example of the code I have written is the following: train - read.csv (train.csv) test - read.csv (test.csv) boost - blackboost (ogred ~ elev + slope +

Re: [R] comparing rows - a possible solution

2008-11-10 Thread markleeds
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, not the individual elements of the matrix. That's just my

[R] using newdata in survfit with categorical variable

2008-11-10 Thread Zhixin Liu
Hi R-helpers, I was trying to put gender='Male' in newdata to create a expected survival curve for a pseudo cohort by using survfit based on Cox regression. My codes are shown below: fit- coxph(Surv(end, status2)~gender, data=wlwsn1) Summary(fit) coef exp(coef) se(coef)

[R] interpreting output from predict.blackboost

2008-11-10 Thread Kirsten Barrett
I would like to use blackboost on a training data set, then use the output to predict a testing dataset, and finally evaluate the errors. An example of the code I have written is the following: train - read.csv (train.csv) test - read.csv (test.csv) boost - blackboost (ogred ~ elev + slope +

Re: [R] using newdata in survfit with categorical variable

2008-11-10 Thread Bill.Venables
This is a bit tricky, but you need to specify the full set of possible levels for the factor in newdata. Try this temp - data.frame(gender = factor(Male, levels = levels(wlwsn1$gender))) wlwsn1curve - survfit(fit, newdata=temp) (Warning: untested code.) Bill Venables

Re: [R] how to stop without error message?

2008-11-10 Thread John Fox
Dear Mark, I see what you mean. Clearly the problem is with try(), since if you eliminate that, the message disappears. On the other hand, if you use try( f.inner(), silent=TRUE), the message is also suppressed. Does that help? John -Original Message- From: [EMAIL PROTECTED]

Re: [R] question about contrast in R for multi-factor linear regression models?

2008-11-10 Thread Michael
Yes, it is possible to lose your mind on this (so perhaps get a real name). A good friend here is ?dummy.coef When I use it, it complained: dummy.coef(yy) Error in dd$A1 : $ operator is invalid for atomic vectors What's wrong? In your case (i.e. treatment contrasts), your reference

Re: [R] how to stop without error message?

2008-11-10 Thread hadley wickham
On Mon, Nov 10, 2008 at 4:42 PM, [EMAIL PROTECTED] wrote: Dear list Can anyone suggest a simple way to abort execution like stop(...) does, but without issuing an Error: ... message? I don't want to set 'options( show.error.messages=TRUE)' because I want normal behaviour to resume after

Re: [R] how to stop without error message?

2008-11-10 Thread hadley wickham
I should have been clearer, sorry-- I'm trying to exit from an inner function which might be several levels deep, returning straight to the R prompt. To be specific, I'm trying to clean up the No Error in... message in my 'debug' package-- the No prefix being my original workaround to

[R] Apology RE:interpreting output from predict.blackboost

2008-11-10 Thread Kirsten Barrett
I apologize for multiple postings of the question below. My email responded with error messages each time I attempted to post and the postings did not appear in my sent messages. I was not aware (until notified) that multiple copies had been sent. Kirsten Barrett On Mon, Nov 10, 2008 at 4:02

Re: [R] how to stop without error message?

2008-11-10 Thread Gabor Grothendieck
Not sure if this qualifies as simple but you can use callCC to force an exit from within an inner call. In this example we call f which calls f1 which calls f2 and then f2 exits right out to the top level returning 0. Note that f2 must know about g: f - function(g) { f1 - function() {

[R] thickness of boxplots

2008-11-10 Thread Kenneth Roy Cabrera Torres
Hi R users: How can I obtain with bwplot boxplots with bwplot whose box width will vary acording to other variable. bwplot(categ1~continuos|categ2,box.ratio=continuos2,data=data.base) But it doesn't work as I expected. Thank you for your help. Kenneth

Re: [R] how to stop without error message?

2008-11-10 Thread Mark.Bravington
Thank you Hadley John Hadley's approach below is the kind of thing I was expecting-- I'd just never managed to figure out how to use tryCatch. John has also made me think that I could probably patch things up by modifying my calls to 'try'-- because sometimes I do want to print the error

Re: [R] how to stop without error message?

2008-11-10 Thread Mark.Bravington
Hi John Using 'on.exit' to reset the show.error.messages option should work, but it doesn't quite... and I'm not sure why. It breaks down with, for want of a better phrase, nested calls to stop, inside 'try' statements. For some reason, the inner 'stop' calls *do* lead to messages, although

[R] R User Group mailing list

2008-11-10 Thread John C Nash
Here in Canada's capital we have set up the Ottawa-Gatineau R Users Group (OGRUG) and are wondering how we can get a special interest group (sig) mailing list established linked to the R-project site. We understand that there may be other RUGs out there, so maybe such a list should be

Re: [R] how to stop without error message?

2008-11-10 Thread Mark.Bravington
Dear list Can anyone suggest a simple way to abort execution like stop(...) does, but without issuing an Error: ... message? I don't want to set 'options( show.error.messages=TRUE)' because I want normal behaviour to resume after this particular stop. What's wrong with return() ?

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

2008-11-10 Thread tedzzx
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 volatility(or daily variance). I know that the s-plus FinMerics has the function aggregateSeries function that can be apply to daily data:

Re: [R] Re : Regarding lme functions

2008-11-10 Thread Dieter Menne
ratna ghosal ratnaghosal at yahoo.com writes: But then how to interpret the rows and columns When lost, use str: library(nlme) fm1Orth.lme = lme(distance ~ I(age-11), data = Orthodont, random = ~ I(age-11) | Subject) ints = intervals(fm1Orth.lme) str(ints) # $

Re: [R] thickness of boxplots

2008-11-10 Thread Deepayan Sarkar
On 11/10/08, Kenneth Roy Cabrera Torres [EMAIL PROTECTED] wrote: Hi R users: How can I obtain with bwplot boxplots with bwplot whose box width will vary acording to other variable. bwplot(categ1~continuos|categ2,box.ratio=continuos2,data=data.base) But it doesn't work as I expected.

Re: [R] question about contrast in R for multi-factor linear regression models?

2008-11-10 Thread Mark Difford
Hi losemind, What's wrong? What's wrong is probably that you never read the help page for dummy.coef properly. But that is a wild guess, since I have no idea what your yy is. And one is strongly inclined to say, Why, oh why? Your first posting on this subject has your linear model fit, which

Re: [R] how to stop without error message?

2008-11-10 Thread Henrik Bengtsson
I've also been looking for solutions to similar problems, but I never found a good solution. However, I think that if it would be possible to send an interrupt signal/condition by code (cf. user press Ctrl-C) one could achieve plenty of things with and without tryCatch(). See Thread 'New

  1   2   >