[R] lattice: cumsum and xyplot
I want to display cumulative summary functions with lattice. First I tried to get cumulated data: library(lattice) data(barley) d.cum - with( barley, by( yield, INDICES=list(site=site,year=year), FUN=cumsum ) ) I got a list of vectors. I tried to get a dataframe which I could use in xyplot. But neither of the following functions led to the goal: d.cum.df1 - as.data.frame.list( d.cum ) d.cum.df2 - as.data.frame.array( d.cum ) Then I tried to solve my problem within the panel function. But now I had to set a value for ylim. test.xyplot - function( data=barley, yr=1931, ymax=600, type='l', ... ){ print( xyplot( data=data, subset=year==yr , type=type , panel=function( x, y, ... ){ panel.xyplot( x, cumsum(y), ... ) } , ylim=c( 0, ymax ) , yield ~ variety | site , scales=list( x=list( alternating=1, rot=90 ) ) , ... )) } What could I do to get a dataframe containing the cumulative values of ``yield'' which I could use to get the cumulative summary plots? Thanks - Wolfram __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] lattice: cumsum and xyplot
Hi! To get a data.frame as.data.frame(do.call(rbind,d.cum)) Sincerely Eryk *** REPLY SEPARATOR *** On 6/11/2004 at 9:17 AM Wolfram Fischer wrote: I want to display cumulative summary functions with lattice. First I tried to get cumulated data: library(lattice) data(barley) d.cum - with( barley, by( yield, INDICES=list(site=site,year=year), FUN=cumsum ) ) I got a list of vectors. I tried to get a dataframe which I could use in xyplot. But neither of the following functions led to the goal: d.cum.df1 - as.data.frame.list( d.cum ) d.cum.df2 - as.data.frame.array( d.cum ) Then I tried to solve my problem within the panel function. But now I had to set a value for ylim. test.xyplot - function( data=barley, yr=1931, ymax=600, type='l', ... ){ print( xyplot( data=data, subset=year==yr , type=type , panel=function( x, y, ... ){ panel.xyplot( x, cumsum(y), ... ) } , ylim=c( 0, ymax ) , yield ~ variety | site , scales=list( x=list( alternating=1, rot=90 ) ) , ... )) } What could I do to get a dataframe containing the cumulative values of ``yield'' which I could use to get the cumulative summary plots? Thanks - Wolfram __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Dipl. bio-chem. Eryk Witold Wolski@MPI-Moleculare Genetic Ihnestrasse 63-73 14195 Berlin 'v' tel: 0049-30-83875219 / \ mail: [EMAIL PROTECTED]---W-Whttp://www.molgen.mpg.de/~wolski __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] rownames of single row matrices
Hi I want to extract rows of a matrix, and preserve rownames even if only one row is selected. Toy example: R a - matrix(1:9,3,3) R rownames(a) - letters[1:3] R colnames(a) - LETTERS[1:3] R a A B C a 1 4 7 b 2 5 8 c 3 6 9 Extract the first two rows: R wanted - 1:2 R a[wanted,] A B C a 1 4 7 b 2 5 8 rownames come through fine. Now extract just one row: R a[1,] A B C 1 4 7 rowname is lost! (also note that this isn't a 1-by-n matrix as needed. This object is a vector). How do I get the rowname back? My best effort is: extract - function(a,wanted){ if(length(wanted)1) { return(a[wanted,]) } else { out - t(as.matrix(a[wanted,])) rownames(out) - rownames(a)[wanted] return(out) } } [note the transpose and as.matrix()]. There must be a better way! Anyone got any better ideas? What is the R rationale for treating a[1,] so differently from a[1:2,] ? -- Robin Hankin Uncertainty Analyst Southampton Oceanography Centre SO14 3ZH tel +44(0)23-8059-7743 [EMAIL PROTECTED] (edit in obvious way; spam precaution) __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] rownames of single row matrices
Hi Robin Have a look at: help([) The fact that dimensions are lost when extracting is a feature of the language. What you need is the drop option. a[1,,drop=FALSE] A B C a 1 4 7 Eric At 10:09 11/06/2004, Robin Hankin wrote: Hi I want to extract rows of a matrix, and preserve rownames even if only one row is selected. Toy example: R a - matrix(1:9,3,3) R rownames(a) - letters[1:3] R colnames(a) - LETTERS[1:3] R a A B C a 1 4 7 b 2 5 8 c 3 6 9 Extract the first two rows: R wanted - 1:2 R a[wanted,] A B C a 1 4 7 b 2 5 8 rownames come through fine. Now extract just one row: R a[1,] A B C 1 4 7 rowname is lost! (also note that this isn't a 1-by-n matrix as needed. This object is a vector). How do I get the rowname back? My best effort is: extract - function(a,wanted){ if(length(wanted)1) { return(a[wanted,]) } else { out - t(as.matrix(a[wanted,])) rownames(out) - rownames(a)[wanted] return(out) } } [note the transpose and as.matrix()]. There must be a better way! Anyone got any better ideas? What is the R rationale for treating a[1,] so differently from a[1:2,] ? -- Robin Hankin Uncertainty Analyst Southampton Oceanography Centre SO14 3ZH tel +44(0)23-8059-7743 [EMAIL PROTECTED] (edit in obvious way; spam precaution) __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] rownames of single row matrices
On Fri, 2004-06-11 at 20:09, Robin Hankin wrote: Hi I want to extract rows of a matrix, and preserve rownames even if only one row is selected. The infamous drop=TRUE default. help([) goes into this. Your toy example, two ways: a - matrix(1:9,3,3) rownames(a) - letters[1:3] colnames(a) - letters[1:3] a[1,,drop=FALSE] a b c a 1 4 7 a[1,,drop=TRUE] a b c 1 4 7 Does that help? Cheers Jason __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Questions about Preserving registers
Duncan Murdoch wrote: On Thu, 10 Jun 2004 09:12:05 -0700 (PDT), Thomas Lumley [EMAIL PROTECTED] wrote : DLL attempted to change FPU control word from 9001f to 90003 I read the instruction on Duncan Murdochs website about preserving registers, but I still dont understand it. For example, This code is for Delphi. You would need to see how to set the FPU control work in Powerstation Fortran, which should be described in its manual. The warning is harmless, so you could just ignore it. The warning means that R has done the change for you. I think it's better to try to fix it. R only checks once (on loading); if Fortran makes the change again, then R code might go wrong later, and if Fortran depends on the original value, then the Fortran code might not work properly. Duncan Murdoch Hi, yes, I have seen this happen when loadng the precompiled yacas dll into R (package to be released). I have not bothered to dig deeper and I have no idea of how to get and set the FPU control word in the wrapper. Is there a compiler macro or does it have to be done with assembler? David __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] setValidity() changes Extends?
Hi, I'm using Version 1.9.0 (2004-04-12) on Windows NT/98/2000 and found the following difference between using setClass(..., valdity = ), respectively using setValidity() afterwards: setValidity() changes the Extends-part of a derived class, is this intended or a bug or am I missing something? ## ## Example code ## setClass(Class1, representation(name = character)) if(!isGeneric(name)) setGeneric(name, function(object) standardGeneric(name)) setMethod(name, Class1, function(object) [EMAIL PROTECTED]) setClass(Class2, representation(Class1)) setClass(Class3, representation(Class2)) getClass(Class3) # as I expected #Slots: # #Name: name #Class: character # #Extends: #Class Class2, directly #Class Class1, by class Class2 validClass3 - function(object){TRUE} setValidity(Class3, validClass3) #Slots: # #Name: name #Class: character # #Extends: Class2 # has been changed??? getClass(Class3) # why does setValidity change Extends? # am I missing something? # This doesn't happen if I use # setClass(..., validity = ) # It, of course, also works if I explicitly use # setClass(Class3, contains = c(Class2, Class1) C32 - new(Class3) name(C32) # generates an error?! #Error in name(C32) : No direct or inherited method for function name for this call is(C32, Class1) # however #TRUE __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] rownames of single row matrices
Go list! The examples on help([) were all I needed. The examples don't explicitly say that rownames are preserved; perhaps this is obvious. It'd be nice if matrix m on the help page had rownames. best wishes rksh -- Robin Hankin Uncertainty Analyst Southampton Oceanography Centre SO14 3ZH tel +44(0)23-8059-7743 [EMAIL PROTECTED] (edit in obvious way; spam precaution) __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] running R UNIX in a mac computer
On Fri, 2004-06-11 at 03:49, Tiago R Magalhaes wrote: Hi to you all My question is: there is a package written in UNIX for which there is no Mac version. I would like to know if it's possible to install the R UNIX version on the MacOSX and run that UNIX package on my Mac (through this UNIX R Vresion on a Mac) I have seen a porfile for r version 1.8.1 on darwin: http://r.darwinports.com/ is that it? aother question related to that if it's possible to use UNIX R in Mac, does anyone know how fast or how slow that is? Tiago, If it is a CRAN package *without* MacOS version, there obviously is a reason for this handicap, and you cannot run the package. If it is a stray package, its developer probably just doesn't have opportunity or will to build a Mac binary, but you can build it yourself if you're lucky. Check the FAQ and ReadMe files with your R/Aqua version to see what you need. With little trouble you can easily use source packages with your Mac R. Many tools are already installed in your OS (perl at least). If the package has only R files, you may be able to install a source package directly. If it has C source code, you should first install MacOS X Developer tools (XCode): it comes with your OS installation CD/DVD, but it is not installed by default. If the package has Fortran source code, you got to find external Fortran compiler: MacOS X ships with C compiler, but without Fortran compiler. See the Mac R FAQ for the best alternatives to find the compiler (this FAQ is installed with your R). Installing a Darwin R orobably won't help you. It needs and uses exactly the same tools to build the packages as R/Aqua. If you can't install a source package in R/Aqua, you cannot install it in R/Darwin, and vice versa. The toolset is the decisive part, not the R shell. I assume that both versions of R are just as fast (or slow). R/Aqua uses highly optimized BLAS for numeric functions, and if R/Darwin uses the same library, it is just as fast. If it doesn't use optimized BLAS, it will be clearly slower. I have installed Linux in Mac, but I found out that R was clearly (20%) slower in Linux than in MacOS in the very same piece of hardware. The main reason seemed to be that Linux R didn't have optimized BLAS because the largest differences were in functions calling svd and qr (I used YellowDog Linux) -- the Linux version took 150%(!) longer to run the same svd-heavy test code. Another reason seemed to be that the Fortran compiler produces much slower code in Linux than in MacOS X (difference about 20%). cheers, jari oksanen -- Jari Oksanen [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] lattice: cumsum and xyplot
--- In reply to: --- Date:11.06.04 09:33 (+0200) From:Wolski [EMAIL PROTECTED] Subject: Re: [R] lattice: cumsum and xyplot Hi! To get a data.frame as.data.frame(do.call(rbind,d.cum)) Thanks for this interesting hint. To get the lost names of factors again, I tried now the following solution: data(barley) d.cum - with( barley, by( yield, INDICES=list(site=site,year=year), FUN=function(x)x ) ) test.bylist2dataframe - function( bylist, col.names=NULL ){ veqq - as.data.frame( do.call( 'rbind', d.cum ) ) if( ! is.null( col.names ) ) colnames( veqq ) - col.names viqt.vars - names( dimnames(bylist) ) if( length( viqt.vars ) == 2 ){ veqq[,viqt.vars[1]] - as.factor( rep( dimnames( bylist )[[viqt.vars[1]]], times=dim(bylist)[2] ) ) veqq[,viqt.vars[2]] - as.factor( rep( dimnames( bylist )[[viqt.vars[2]]], each=dim(bylist)[1] ) ) } veqq } d.cum.dfr - test.bylist2dataframe( d.cum, col.names=unique( as.character( barley$variety ) ) ) But now I have the following problems: - ``d.cum.dfr'' is not yet normalised. - My solution works only for two ``INDICES''. So, what to do? - Wolfram *** REPLY SEPARATOR *** On 6/11/2004 at 9:17 AM Wolfram Fischer wrote: I want to display cumulative summary functions with lattice. First I tried to get cumulated data: library(lattice) data(barley) d.cum - with( barley, by( yield, INDICES=list(site=site,year=year), FUN=cumsum ) ) I got a list of vectors. I tried to get a dataframe which I could use in xyplot. But neither of the following functions led to the goal: d.cum.df1 - as.data.frame.list( d.cum ) d.cum.df2 - as.data.frame.array( d.cum ) Then I tried to solve my problem within the panel function. But now I had to set a value for ylim. test.xyplot - function( data=barley, yr=1931, ymax=600, type='l', ... ){ print( xyplot( data=data, subset=year==yr , type=type , panel=function( x, y, ... ){ panel.xyplot( x, cumsum(y), ... ) } , ylim=c( 0, ymax ) , yield ~ variety | site , scales=list( x=list( alternating=1, rot=90 ) ) , ... )) } What could I do to get a dataframe containing the cumulative values of ``yield'' which I could use to get the cumulative summary plots? Thanks - Wolfram __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] comparing regression slopes
Dear List, I used rlm to calculate two regression models for two data sets (rlm due to two outlying values in one of the data sets). Now I want to compare the two regression slopes. I came across some R-code of Spencer Graves in reply to a similar problem: http://www.mail-archive.com/[EMAIL PROTECTED]/msg0.html The code was: df1 - data.frame(x=1:10, y=1:10+rnorm(10)) #3observations in original code df2 - data.frame(x=1:10, y=1:10+rnorm(10)) fit1 - lm(y~x, df1) s1 - summary(fit1)$coefficients fit2 - lm(y~x, df2) s2 - summary(fit2)$coefficients db - (s2[2,1]-s1[2,1]) sd - sqrt(s2[2,2]^2+s1[2,2]^2) df - (fit1$df.residual+fit2$df.residual) td - db/sd 2*pt(-abs(td), df) [1] 0.9510506 However when I use rlm instead of lm I get NA for df.residual. fit1 - rlm(y~x, df1) fit1$df.residual [1] NA Does this mean that I can not apply the code for values gained by rlm? In the example above I continued by taking the df from: summary(fit1)$df[2] [1] 8 Is this o.k.? Help greatly appreciated. Best, Nathan Weisz __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] comparing regression slopes
It's not OK. Treat the results from rlm as having infinite df since the theory is asymptotic (use pnorm not pt), and don't expect anything useful in samples as small as 10 cases (30+, preferably 100+ would be OK). On Fri, 11 Jun 2004, Nathan Weisz wrote: Dear List, I used rlm to calculate two regression models for two data sets (rlm due to two outlying values in one of the data sets). Now I want to compare the two regression slopes. I came across some R-code of Spencer Graves in reply to a similar problem: http://www.mail-archive.com/[EMAIL PROTECTED]/msg0.html The code was: df1 - data.frame(x=1:10, y=1:10+rnorm(10)) #3observations in original code df2 - data.frame(x=1:10, y=1:10+rnorm(10)) fit1 - lm(y~x, df1) s1 - summary(fit1)$coefficients fit2 - lm(y~x, df2) s2 - summary(fit2)$coefficients db - (s2[2,1]-s1[2,1]) sd - sqrt(s2[2,2]^2+s1[2,2]^2) df - (fit1$df.residual+fit2$df.residual) td - db/sd 2*pt(-abs(td), df) [1] 0.9510506 However when I use rlm instead of lm I get NA for df.residual. fit1 - rlm(y~x, df1) fit1$df.residual [1] NA Does this mean that I can not apply the code for values gained by rlm? In the example above I continued by taking the df from: summary(fit1)$df[2] [1] 8 Is this o.k.? Help greatly appreciated. Best, Nathan Weisz __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] comparing regression slopes
Fortunately, you don't have to accept no for an answer: You can dream up something that you think is sensible, simulate scenarios you want to detect plus scenarios with no difference, and find out what your procedure produces, the distributions of your sample statistics, etc., e.g., as described by Venables and Ripley (2000) S Programming (Springer) to obtain confidence intervals for normal probability plots. R has many functions for pseudo-random number generation as well as packages for bootstrapping. Only a few hours ago, I checked a theoretical computation using pseudo-random numbers. hope this helps. spencer graves Prof Brian Ripley wrote: It's not OK. Treat the results from rlm as having infinite df since the theory is asymptotic (use pnorm not pt), and don't expect anything useful in samples as small as 10 cases (30+, preferably 100+ would be OK). On Fri, 11 Jun 2004, Nathan Weisz wrote: Dear List, I used rlm to calculate two regression models for two data sets (rlm due to two outlying values in one of the data sets). Now I want to compare the two regression slopes. I came across some R-code of Spencer Graves in reply to a similar problem: http://www.mail-archive.com/[EMAIL PROTECTED]/msg0.html The code was: df1 - data.frame(x=1:10, y=1:10+rnorm(10)) #3observations in original code df2 - data.frame(x=1:10, y=1:10+rnorm(10)) fit1 - lm(y~x, df1) s1 - summary(fit1)$coefficients fit2 - lm(y~x, df2) s2 - summary(fit2)$coefficients db - (s2[2,1]-s1[2,1]) sd - sqrt(s2[2,2]^2+s1[2,2]^2) df - (fit1$df.residual+fit2$df.residual) td - db/sd 2*pt(-abs(td), df) [1] 0.9510506 However when I use rlm instead of lm I get NA for df.residual. fit1 - rlm(y~x, df1) fit1$df.residual [1] NA Does this mean that I can not apply the code for values gained by rlm? In the example above I continued by taking the df from: summary(fit1)$df[2] [1] 8 Is this o.k.? Help greatly appreciated. Best, Nathan Weisz __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Continuous-lag Markov chains?
Hi again, I am wondering if there is any R package which does continuous- lag Markov chains modelling? I discovered MCMCpack but i am not sure it does continuous-lags. Thanks for your answers, Monica Manchester University __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] set user-agent for download
Hi, does anybody know if it is possible to set a user-agent for download using a proxy? Thank you. Hans Kestler__ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] how to install yags in R
Dear R users, I search the R archives and noted that the same problem has been posted but without solution. I know there IS instructions by the author of yags, but I just couldn't figured out. I know gee and geepack can also perform generalized estimating equation, but the reason why I need yags is I want to perform a Small Sample Adjustments by Michael P. Fay and Barry I. Graubard in Biometrics, 2001, 57: 1198-1206. I'm working on some dental data (I'm a dentist) with repeat measurements on relatively small sample sizes (around 20 to 50 teeth), and GEE seems to be quite ineffient (i.e. less powerful) compared to other methods. I wonder it is really due to the sample size is too small, and GEE should not be used? Many thanks in advance. best regards, Yu-Kang http://match.msn.com.tw __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] set user-agent for download
Hans Kestler wrote: Hi, does anybody know if it is possible to set a user-agent for download using a proxy? See ?download.file for details. Uwe Ligges Thank you. Hans Kestler __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Informal discussion group about R
Hoi Harold, --On donderdag 10 juni 2004 7:55 -0700 Baize, Harold [EMAIL PROTECTED] wrote: I've started a tribe for discussing R and sharing scripts. Tribe.net is one of the popular I hope it will be of help to newbies, although I'm new to R myself. Here is the url: http://r-statisticalenvironment.tribe.net Recently I discovered that there's also a community on Orkut called R-project http://www.orkut.com/Community.aspx?cmm=11845, with similar entry level discussions on problem solving with/in R. The same if holds: registration with Orkut obligatory. Perhaps these communities can/will function as the low-entry level help that was discussed around a year ago. kind regards, Paul -- Paul Lemmens NICI, University of Nijmegen ASCII Ribbon Campaign /\ Montessorilaan 3 (B.01.05)Against HTML Mail \ / NL-6525 HR Nijmegen X The Netherlands / \ Phonenumber+31-24-3612648 Fax+31-24-3616066 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Continuous-lag Markov chains?
Monica Palaseanu-Lovejoy wrote: Hi again, I am wondering if there is any R package which does continuous- lag Markov chains modelling? I discovered MCMCpack but i am not sure it does continuous-lags. MCMCpack fits Bayesian models using Markov Chain Monte Carlo simulation, which is a very different thing to fitting Markov chain models to data! You might be interested in my msm package on CRAN, which fits continuous time Markov models to either fully-observed trajectories or interval-censored data. Chris -- Christopher Jackson [EMAIL PROTECTED], Research Associate, Department of Epidemiology and Public Health, Imperial College School of Medicine, Norfolk Place, London W2 1PG, tel. 020 759 43371 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] [RSPerl] Loading problem
Hi I'm a new user with R, and I try to use it from Perl. So I have to use RSPerl. I tried to load it with library(RSPerl) : library(RSPerl) Error in dyn.load(x, as.logical(local), as.logical(now)) : unable to load shared library /usr/local/lib/R/library/RSPerl/libs/RSPerl.so: /usr/lib/perl5/vendor_perl/5.8.1/i586-linux-thread-multi/auto/Apache/Languag e/Language.so: undefined symbol: perl_cmd_perl_TAKE1 Error in library(RSPerl) : .First.lib failed I recompile R and reinstall RSPerl, but the problem stays. other infos : - gcc 3.3.1 - perl 5.8.1 - R 1.9.0 - System GNU/Linux (suze) If someone has an idea to solve this problem... cordially Emmanuel Engelhqrt [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Sweave and multiple graphs
Dear list, I am using Sweave to build a small report. I want to produce a series of figures, each figure containing a number of plots and then have them included in the Sweave file. An example would be to : postscript(file = ANCbwplot%03d.eps, onefile = FALSE, other options...) oldpar - par(mfrow = c(2,2)) do lots of plots to produce a number of eps files par(oldpar) dev.off() The example in the Sweave FAQ shows how to do something similar for cases where you know how many figures there are, but I do not know how many figures will be produced so want to produce a more generic solution. I thought of doing the above code in Sweave, and because I named the plots in a unique way, I now want to read all the files in the current directory that match ANCbwplot001.eps or ANCbwplot002.eps or ANCbwplot003.eps an so on. If I have this as a vector in R, then I can loop over this vector and do something like: results=tex,echo=FALSE= file.vec - all files in directory that match name for(i in seq(along=file.vec)) { cat(\\includegraphics{, file.vec[i], }\n\n, sep) } @ in Sweave. I'm not sure about getting a list of file names from the current working directory that match a given string that I can then loop over and print out using cat as shown above. If anyone has any suggestions as to how to go about doing this that they are willing to share I would be most grateful. Thanks in advance, Gavin -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Gavin Simpson [T] +44 (0)20 7679 5522 ENSIS Research Fellow [F] +44 (0)20 7679 7565 ENSIS Ltd. ECRC [E] [EMAIL PROTECTED] UCL Department of Geography [W] http://www.ucl.ac.uk/~ucfagls/cv/ 26 Bedford Way[W] http://www.ucl.ac.uk/~ucfagls/ London. WC1H 0AP. %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Sweave and multiple graphs
[EMAIL PROTECTED] wrote on 11/06/2004 14:07:18: Dear list, I am using Sweave to build a small report. I want to produce a series of figures, each figure containing a number of plots and then have them included in the Sweave file. An example would be to : postscript(file = ANCbwplot%03d.eps, onefile = FALSE, other options...) oldpar - par(mfrow = c(2,2)) do lots of plots to produce a number of eps files par(oldpar) dev.off() The example in the Sweave FAQ shows how to do something similar for cases where you know how many figures there are, but I do not know how many figures will be produced so want to produce a more generic solution. I thought of doing the above code in Sweave, and because I named the plots in a unique way, I now want to read all the files in the current directory that match ANCbwplot001.eps or ANCbwplot002.eps or ANCbwplot003.eps an so on. If I have this as a vector in R, then I can loop over this vector and do something like: results=tex,echo=FALSE= file.vec - all files in directory that match name for(i in seq(along=file.vec)) { cat(\\includegraphics{, file.vec[i], }\n\n, sep) } @ in Sweave. I'm not sure about getting a list of file names from the current working directory that match a given string that I can then loop over and print out using cat as shown above. If anyone has any suggestions as to how to go about doing this that they are willing to share I would be most grateful. Thanks in advance, [EMAIL PROTECTED] wrote on 11/06/2004 14:07:18: Dear list, [ generation of lots of graphics files to include in Sweave document] I'm not sure about getting a list of file names from the current working directory that match a given string that I can then loop over and print out using cat as shown above. If anyone has any suggestions as to how to go about doing this that they are willing to share I would be most grateful. Thanks in advance, Use list.files(). It has a path argument (to specify the directory) and a pattern argument to put the regular expression. mygraphs - list.files(path=./mygraphs, pattern=^ANCbwplot.*\\.eps) See ?list.files and maybe ?regex HTH, Tobias __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] interaction plot with error bars based on TukeyHSD intervals
Hello, maybe the previous message was not very clear. Thus, I will try to explain the problem in a better way. I would like to have an interaction plot with error bars based on TukeyHSD intervals. In an experiment with two factors A and B, each of them with two levels A={a1,a2} and B={b1,b2}, I would like to do a plot like the following: attached image prueba.png I calculate the corresponding interval with: tk - TukeyHSD(aov(X$response ~ (factor(X$A) + factor(X$B))2, data=X) , conf.level=0.95) HSDfactor - max(abs(tk$factor(X$A):factor(X$B)[,2]-tk$factor(X$A):factor(X$B)[,3])) Finally, I modified interaction.plot() to add error bars with: .. ++ ylim - c(min(cells)-(HSDfactor*0.5), max(cells)+(HSDfactor*0.5)) matplot(xvals, cells, ..., type = type, xlim = xlim, ylim = ylim, xlab = xlab, ylab = ylab, axes = axes, xaxt = n, col = col, lty = lty, pch = pch) ++ ly - cells[,1]+(HSDfactor*0.5) ++ uy - cells[,1]-(HSDfactor*0.5) ++ errbar(xvals,cells[,1],ly,uy,add=TRUE, lty=3, cap=0, lwd=2) ++ ly - cells[,2]+(HSDfactor*0.5) ++ uy - cells[,2]-(HSDfactor*0.5) ++ errbar(xvals,cells[,2],ly,uy,add=TRUE, lty=3, cap=0, lwd=2) if(legend) { yrng - diff(ylim) yleg - ylim[2] - 0.1 * yrng . However, the resulting intervals are much bigger than they should be, thus I think I did something wrong. I have searched on Google, CRAN and the R mail archive but I only found related problems [1, 2], but not any answer... Andrew Robinson [1] shows that there is a problem when using TukeyHSD for interaction terms. However, nobody suggested any work-around. In another different thread, Martin Henry H. Stevens [2] suggests a work-around for the problem, but he thinks that the results obtained are slightly inaccurate. As well, there is not feedback to solve the problem. Any idea? Thank you very much. Manuel. [1] http://finzi.psych.upenn.edu/R/Rhelp02/archive/12926.html [2] http://finzi.psych.upenn.edu/R/Rhelp02/archive/32849.html inline: prueba.png__ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Modifying Code in .rda based packages (e.g. lme4)
Dear List, assume I want to make a minor local change in a package that is supplied as .rda. For example, I want to get rid of the non-verbose-protected Iteration message in GLMM/lme4. Probably I have to load / change / save the package, but could someone help me to get the syntax right? Dieter Menne __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Modifying Code in .rda based packages (e.g. lme4)
No standard R package is supplied as a .rda, including not lme4. You must be looking at a binary installation, and you would do best to reinstall from the sources. You could use R --vanilla load(/all.rda) fix(GLMM) save(ls(all=T), file=/all.rda, compress = TRUE) q() but we would not recommend it. Indeed, we do not recommend your altering functions in other people's packages. Why not just make a copy of GLMM with another name and alter that? On Fri, 11 Jun 2004, Dieter Menne wrote: assume I want to make a minor local change in a package that is supplied as .rda. For example, I want to get rid of the non-verbose-protected Iteration message in GLMM/lme4. Probably I have to load / change / save the package, but could someone help me to get the syntax right? -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Modifying Code in .rda based packages (e.g. lme4)
You should probably download the source for the package from CRAN, modify the source, then reinstall. -roger Dieter Menne wrote: Dear List, assume I want to make a minor local change in a package that is supplied as .rda. For example, I want to get rid of the non-verbose-protected Iteration message in GLMM/lme4. Probably I have to load / change / save the package, but could someone help me to get the syntax right? Dieter Menne __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] own family for glm()
Is it possible in R to create a customized family to be used with glm()? I see no mention of this possibility in the documentation. (S-plus has something called make.family). == I.White ICAPB, University of Edinburgh Ashworth Laboratories, West Mains Road Edinburgh EH9 3JT Fax: 0131 650 6564 Tel: 0131 650 5490 E-mail: [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] dll file missing?
Hi, I am trying to do a dyn.load(), but I get the following error... dyn.load(fileGT.dll) Error in dyn.load(x, as.logical(local), as.logical(now)) : unable to load shared library C:/R_Files/fileGT.dll: LoadLibrary failure: The specified module could not be found. It states it can't find the dll but it is in that directory. I have checked the file properties and the read and execute checkboxes are ticked. My C++ code uses a 3rd party library. I have linked it using the g++ commands and it compiles fine. Could this be the source of my problems? Does anyone know the reason for this? Any help is appreciated, Sam. Samuel Edward Kemp BSc (Hons) Cardiff Neural Evolutionary Computation Research Group School of Computing University of Glamorgan CF37 1DL Tel: (+44)443 483612 Fax:(+44)443 482715 e-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] own family for glm()
On Fri, 11 Jun 2004, I M S White wrote: Is it possible in R to create a customized family to be used with glm()? I see no mention of this possibility in the documentation. (S-plus has something called make.family). It is possible. Package MASS has two examples, the simpler of which is neg.bin and the other is negative.binomial. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] dll file missing?
On Fri, 11 Jun 2004, Kemp S E (Comp) wrote: Hi, I am trying to do a dyn.load(), but I get the following error... dyn.load(fileGT.dll) Error in dyn.load(x, as.logical(local), as.logical(now)) : unable to load shared library C:/R_Files/fileGT.dll: LoadLibrary failure: The specified module could not be found. It states it can't find the dll but it is in that directory. Actually, it doesn't say that. It says a specified module could not be found, without specifying which. Windows could be more helpful in its error messages (which version of Windows is this?). I have checked the file properties and the read and execute checkboxes are ticked. My C++ code uses a 3rd party library. I have linked it using the g++ commands and it compiles fine. Could this be the source of my problems? It could well be. Any DLLs that fileGT.dll depends on must be in the same directory or in your PATH. Those DLLs are modules specified by fileGT.dll, hence the confusing error message. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Einlesen von Daten unter R
Sehr geehrte Damen und Herren, An der Fachhochschule Winterthur wurde für mich im Rahmen einer Diplomarbeit (Prof. Ruckstuhl) ein R-Programm zur Auswertung von IR-Spektren (line-shape-Analyse zur quantitativen Analyse von Gasmischungen) entwickelt. Die Daten werden einer Excel-Tabelle entnommen. Bisher werden die spektroskopischen Daten über den Inhalt von 64 Kanälen über die RS232-Schnittstelle seriell mittels eines Labview-Programmes in eine Excel-Tabelle eingelesen. Die Verwendung der beiden Programme Labview und R ist unpraktisch. Es stellt sich daher die Frage, ob serielle Daten auch über R eingelesen werden können oder ob das R-Programm in ein Labview-Programm eingebaut werden kann. Ich wäre sehr froh, wenn Sie mir in dieser Sache behilflich sein könnten. Ebenso möchte ich gerne Näheres über R erfahren. Zur Verfügung steht mir bisher das bekannte Büchlein über R und eine Beschreibung Message Boxes in R TclTk. Mit freundlichen Grüssen Dr. Oscar Oehler Phys.Dept. ETHZ HPF D12 8093 Zürich Tel 3 21 65 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Modifying Code in .rda based packages (e.g. lme4)
Dieter Menne [EMAIL PROTECTED] writes: assume I want to make a minor local change in a package that is supplied as .rda. For example, I want to get rid of the non-verbose-protected Iteration message in GLMM/lme4. Probably I have to load / change / save the package, but could someone help me to get the syntax right? Brian Ripley already replied on how to change the code. I just wanted to say that we will add verbose protection to the Iteration messages in GLMM/lme4. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] [R-pkgs] New package: RUnit
We would like to announce the availability on CRAN of a new package: RUnit It contains a unit testing framework strongly inspired by Javas popular JUint package. In addition it contains some functionality to investigate the degree to which some function is covered by a test suite. The main aims of the package are - to support a development style where test cases are written and constantly executed parallel to implementing the actual functinality. - to deliver the results of a test run in a format as structured and helpful as possible. Besides the usual function documentation the doc subdirectory contains a pdf file with additional information. Questions, comments and suggestions are greatly appreciated. Happy testing Matthias Burger Thomas Koenig Klaus Juenemann -- Klaus Juenemann Epigenomics AG www.epigenomics.com Kastanienallee 24 +493024345393 10435 Berlin ___ R-packages mailing list [EMAIL PROTECTED] https://www.stat.math.ethz.ch/mailman/listinfo/r-packages __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] ROC for threshold value, biometrics
Hello, I am just a beginner of R 1.9.0. I try to construct a predictive score for the development of liver cancer in cirrhotic patients. So dependant variable is binanry (cancer yes or no). Independant variables are biological data. The aim is to find out a cut-off value which differentiate (theoratically) from normal to pathological state for each biological data. How can I step in procedue to get a cut-off value (threshold) for each variable? I think I should try by ROC. But I'm not sure. If so, someone can lead me? If not, someone can advice me how ? Any advice will be cordially aprreciated. Tin Tin Htar Myint Research assistant Liver unit Jean Verdier Hospital, Bondy France __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] *** NEWBIE QUESTION *** QUANTILE FUNCTIONS
Dear all, sorry this will sound as naive as it can be. I need to know whether there is a closed analytical form (even approximated) to the quantile function for the Binomial? and for the Poisson? if not, what is the best citation to use when stating this? Thank you, Pier Luca __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Sweave and multiple graphs
[EMAIL PROTECTED] wrote: Use list.files(). It has a path argument (to specify the directory) and a pattern argument to put the regular expression. mygraphs - list.files(path=./mygraphs, pattern=^ANCbwplot.*\\.eps) See ?list.files and maybe ?regex HTH, Tobias Hi Tobias. Thanks for the reply. I just found list.files() but was struggling with specifying the pattern argument. I have this working very well now for my application like so in a Sweave file: echo=FALSE,results=tex= postscript(file = ANCbwplot%03d.eps, onefile = FALSE, paper = special, width = 4, height = 6, horizontal = FALSE) oldpar - par(mfrow = c(4,3)) for (i in seq(along = g1865.w.res99)) { multplot(g1865.w.res99[[i]], m.title = names(g1865.w.res99[i])) } par(oldpar) invisible(dev.off()) graphs - list.files(pattern = ^ANCbwplot.*\\.eps) for (i in seq(along = graphs)) { cat(\\includegraphics{, graphs[i], }\n\n, sep = ) } @ multplot() is just a helper function that extracts the relevant information from the list g1865.w.res99 and plots a boxplot Many thanks for your help, Gavin -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Gavin Simpson [T] +44 (0)20 7679 5522 ENSIS Research Fellow [F] +44 (0)20 7679 7565 ENSIS Ltd. ECRC [E] [EMAIL PROTECTED] UCL Department of Geography [W] http://www.ucl.ac.uk/~ucfagls/cv/ 26 Bedford Way[W] http://www.ucl.ac.uk/~ucfagls/ London. WC1H 0AP. %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] *** NEWBIE QUESTION *** QUANTILE FUNCTIONS
Pier Luca Lanzi wrote: Dear all, sorry this will sound as naive as it can be. I need to know whether there is a closed analytical form (even approximated) to the quantile function for the Binomial? and for the Poisson? if not, what is the best citation to use when stating this? Thank you, Pier Luca Hi Pier, ?qbinom, ?qpois --sundar __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Einlesen von Daten unter R
hello, sorry, I cannot help you but if you post it again in English (because it is an English speaking mailing list) your are likely to receive a helpful reply. Cheers Martin On Friday 11 June 2004 15:52, Oscar Oehler wrote: Sehr geehrte Damen und Herren, An der Fachhochschule Winterthur wurde für mich im Rahmen einer Diplomarbeit (Prof. Ruckstuhl) ein R-Programm zur Auswertung von IR-Spektren (line-shape-Analyse zur quantitativen Analyse von Gasmischungen) entwickelt. Die Daten werden einer Excel-Tabelle entnommen. Bisher werden die spektroskopischen Daten über den Inhalt von 64 Kanälen über die RS232-Schnittstelle seriell mittels eines Labview-Programmes in eine Excel-Tabelle eingelesen. Die Verwendung der beiden Programme Labview und R ist unpraktisch. Es stellt sich daher die Frage, ob serielle Daten auch über R eingelesen werden können oder ob das R-Programm in ein Labview-Programm eingebaut werden kann. Ich wäre sehr froh, wenn Sie mir in dieser Sache behilflich sein könnten. Ebenso möchte ich gerne Näheres über R erfahren. Zur Verfügung steht mir bisher das bekannte Büchlein über R und eine Beschreibung Message Boxes in R TclTk. Mit freundlichen Grüssen Dr. Oscar Oehler Phys.Dept. ETHZ HPF D12 8093 Zürich Tel 3 21 65 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] par specification inside formula vs. outside function call
The other day I asked a question about changing the size of axis labels in a dotchart. Chuck Cleland provided the answer, which was to specify par(cex.axis = .8) outside the call to dotchart I had tried this inside the formula, and it did nothing (nor did it produce an error). I was wondering when it is necessary to specify things outside versus. inside a call to a function Thanks Peter Peter L. Flom, PhD Assistant Director, Statistics and Data Analysis Core Center for Drug Use and HIV Research National Development and Research Institutes 71 W. 23rd St www.peterflom.com New York, NY 10010 (212) 845-4485 (voice) (917) 438-0894 (fax) __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Einlesen von Daten unter R
My German is not very good but I assume your question is how to interface Labview and R. You might want to have a look at the two R COM interfaces that are available: http://cran.r-project.org/other-software.html http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l http://www.omegahat.org Oscar Oehler oehler at phys.ethz.ch writes: : : Sehr geehrte Damen und Herren, : : An der Fachhochschule Winterthur wurde fr mich im Rahmen einer : Diplomarbeit (Prof. Ruckstuhl) ein R-Programm zur Auswertung von : IR-Spektren (line-shape-Analyse zur quantitativen Analyse von : Gasmischungen) entwickelt. Die Daten werden einer Excel-Tabelle : entnommen. Bisher werden die spektroskopischen Daten ber den Inhalt von : 64 Kanlen ber die RS232-Schnittstelle seriell mittels eines : Labview-Programmes in eine Excel-Tabelle eingelesen. : : Die Verwendung der beiden Programme Labview und R ist unpraktisch. Es : stellt sich daher die Frage, ob serielle Daten auch ber R eingelesen : werden knnen oder ob das R-Programm in ein Labview-Programm eingebaut : werden kann. : : Ich wre sehr froh, wenn Sie mir in dieser Sache behilflich sein : knnten. Ebenso mchte ich gerne Nheres ber R erfahren. Zur Verfgung : steht mir bisher das bekannte Bchlein ber R und eine Beschreibung : Message Boxes in R TclTk. : : Mit freundlichen Grssen : : : Dr. Oscar Oehler : Phys.Dept. ETHZ : HPF D12 : 8093 Zrich : Tel 3 21 65 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] My useR! slides: Doing Customer Intelligence with R
FYI for useR! attendees others. The slides for my talk Doing Customer Intelligence with R are up on our R weblog: R.LoyaltyMatrix.com Also note any books ordered through the links on the blog will benefit the R Foundation - see blog for details. I will be using the blog as an informal log of our adventures using R for data mining, business intelligence and, in particular, customer intelligence. Comments on my blog posts are encouraged. Guest authors are welcome - contact me directly. Once again, many thanks to the useR! organizers and the local team in Vienna for the great meeting! Jim Porzak Director of Analytics Loyalty Matrix, Inc. R.LoyaltyMatrix.com www.LoyaltyMatrix.com __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] question about Rcmd SHLIB
Dear R People: I'm trying to use the Rcmd SHLIB to produce a dll. Rcmd SHLIB -o test2.dll test2.f make[1]: *** [libR.a] Error 255 make: *** [libR] Error 2 Where do I go to find out about the make errors, please? I suspect that I might be missing something. I have the tools for creating new packages, but maybe I left out something. This is for R version 1.9.0 on Windows. Thanks in advance, Sincerely, Laura mailto: [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] par specification inside formula vs. outside function cal l
From: Peter Flom The other day I asked a question about changing the size of axis labels in a dotchart. Chuck Cleland provided the answer, which was to specify par(cex.axis = .8) outside the call to dotchart I had tried this inside the formula, and it did nothing (nor did it produce an error). I was wondering when it is necessary to specify things outside versus. inside a call to a function My guess is that the fourth line from the bottom of dotchart(): axis(1) which does not contain ..., so any graphical parameters you set through arguments to dotchart() would not have any effect on the x-axis. You can create a copy of dotchart (say dotchart2) that has axis(1, ...) instead, and I believe that will work. Andy Thanks Peter Peter L. Flom, PhD Assistant Director, Statistics and Data Analysis Core Center for Drug Use and HIV Research National Development and Research Institutes 71 W. 23rd St www.peterflom.com New York, NY 10010 (212) 845-4485 (voice) (917) 438-0894 (fax) __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] question about Rcmd SHLIB
See readme.packages. It would help to run make libR.a first. On Fri, 11 Jun 2004, Laura Holt wrote: Dear R People: I'm trying to use the Rcmd SHLIB to produce a dll. Rcmd SHLIB -o test2.dll test2.f make[1]: *** [libR.a] Error 255 make: *** [libR] Error 2 Where do I go to find out about the make errors, please? I suspect that I might be missing something. I have the tools for creating new packages, but maybe I left out something. This is for R version 1.9.0 on Windows. Thanks in advance, Sincerely, Laura mailto: [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] lme newbie question
Hi I try to implement a simple 2-factorial repeated-measure anova in the lme framework and would be grateful for a short feedback -my dependent var is a reaction-time (rt), -as dependent var I have -the age-group (0/1) the subject belongs to (so this is a between-subject factor), and -two WITHIN experimental conditions, one (angle) having 5, the other 3 (hands) factor-levels; means each subjects performs on 3 * 5 = 15 different task diffiulties Am I right in this lme implementation, when I want to investigate the influence of the age.group, and the two conditions on the rt: my.lme - lme(rt ~ age.group + angles * hands, data = my.data, random = ~ 1 |subject) then I think I would have to compare the model above with a more elaborated one, including more interactions: my.lme2 - lme(rt ~ age.group * angles * hands, data = my.data, random = ~ 1 |subject) and comparing them by performing a likelhood-ratio test, yes? I think, if I would like to generalize the influence of the experimental conditions on the rt I should define angles and hands as a random effect, yes? ? thanks for a short feedback. It seems, repeated-measures anova's aren't a trivial topic in R :) Cheers! Christoph -- Christoph Lehmann [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] question about Rcmd SHLIB
Laura Holt [EMAIL PROTECTED] writes: Dear R People: I'm trying to use the Rcmd SHLIB to produce a dll. Rcmd SHLIB -o test2.dll test2.f make[1]: *** [libR.a] Error 255 make: *** [libR] Error 2 Where do I go to find out about the make errors, please? I suspect that I might be missing something. I have the tools for creating new packages, but maybe I left out something. This is for R version 1.9.0 on Windows. I've seen this before... I seem to recall that it is a PATH issue. Looks like make went looking for libR.a and couldn't find it. -- O__ Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] [StatDataML] compile error
Hi, sorry if this is OT here. I'm trying to compile StatDataML[1] to import Matlab data into R. The R part works fine but compiling the Matlab part exits with this error message (following the INSTALL instructions: autoconf - ./configure - make): ,[ [EMAIL PROTECTED]:~/src/statdatml/StatDataML/MatOct make ] | make[1]: Entering directory `/home/patrick/src/statdatml/StatDataML/MatOct/matlab' [...] | mex readsdml.c-Dmatlab | readsdml.c:26:27: libxml/parser.h: Datei oder Verzeichnis nicht gefunden [...] ` libxml2 is installed: ,[ [EMAIL PROTECTED]:~/src/statdatml/StatDataML/MatOct locate libxml/parser.h ] | /usr/include/libxml2/libxml/parser.h ` Can somebody give me a pointer if there's anything else I need to install to get StatDataML running? Do I need to configure xml somehow? I'm running current Matlab (6.5SP1) and R 1.9.1 alpha on a linux box (SuSE 8.2Prof). Footnotes: [1] http://www.omegahat.org/StatDataML/ -- What happens if a big asteroid hits Earth ? Judging from realistic simulations involving a sledge hammer and a common laboratory frog, we can assume it will be pretty bad. -- Dave Barry __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] lme newbie question
On 11 Jun 04, at 20:12, Christoph Lehmann wrote: Hi I try to implement a simple 2-factorial repeated-measure anova in the lme framework and would be grateful for a short feedback -my dependent var is a reaction-time (rt), -as dependent var I have -the age-group (0/1) the subject belongs to (so this is a between-subject factor), and -two WITHIN experimental conditions, one (angle) having 5, the other 3 (hands) factor-levels; means each subjects performs on 3 * 5 = 15 different task diffiulties Am I right in this lme implementation, when I want to investigate the influence of the age.group, and the two conditions on the rt: my.lme - lme(rt ~ age.group + angles * hands, data = my.data, random = ~ 1 |subject) then I think I would have to compare the model above with a more elaborated one, including more interactions: my.lme2 - lme(rt ~ age.group * angles * hands, data = my.data, random = ~ 1 |subject) and comparing them by performing a likelhood-ratio test, yes? I think, if I would like to generalize the influence of the experimental conditions on the rt I should define angles and hands as a random effect, yes? Perhaps I've missed something here, but wouldn't your ability to generalize about the experimental conditions depend, in part, on how their levels were selected? Were the angles randomly sampled? Were the hands randomly sampled (not sure what that would mean)? If not, how does defining these conditions to be random effects in a model enable valid generalization? ---JRG John R. Gleason Syracuse University 430 Huntington Hall Voice: 315-443-3107 Syracuse, NY 13244-2340 USA FAX: 315-443-4085 PGP public key at keyservers __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] space-time k function problem
I am intersted in time-space clustering of local industry. I made the point file, polygons and time table then run 'stkhat' function in Splancs, but it generates only time k function. I noticed that it has only one ks value. ... Can anybody help me?. thanks in advance. countiespt - read.table('d:/dissertation/dailynew/jun10/countiespt_ok.txt', sep=,) polymap(countiespt) manufacpt - read.table('d:/dissertation/dailynew/jun10/manufacpt.txt', sep=,) names(manufacpt)-c(x, y) manufac23-read.table('d:/dissertation/dailynew/jun10/manufac23.txt', sep=,) names(manufac23)-c(x, y, t) manufac23-read.table('d:/dissertation/dailynew/jun10/manufac23.txt', sep=,) names(manufac23)-c(x, y, t) bur2 - stkhat(manufacpt, manufac23$t, countiespt, c(34060, 37712), seq(1,60,60), seq(91,1005,60)) oldpar - par(mfrow=c(2,1)) plot(bur2$s, bur1$ks, type=l, xlab=distance, ylab=Estimated K, main=spatial K function) plot(bur2$t, bur2$kt, type=l, xlab=time, ylab=Estimated K, main=temporal K function) par(oldpar) [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] space-time k function problem
On Fri, 11 Jun 2004, hkang wrote: I am intersted in time-space clustering of local industry. I made the point file, polygons and time table then run 'stkhat' function in Splancs, but it generates only time k function. I noticed that it has only one ks value. ... Can anybody help me?. I think you need to coerce manufacpt to be a two-column matrix, now it is a data.frame, which is a different object structure. as.matrix(manufacpt) should help, look at str(manufacpt) to see what is inside. thanks in advance. countiespt - read.table('d:/dissertation/dailynew/jun10/countiespt_ok.txt', sep=,) polymap(countiespt) manufacpt - read.table('d:/dissertation/dailynew/jun10/manufacpt.txt', sep=,) names(manufacpt)-c(x, y) manufac23-read.table('d:/dissertation/dailynew/jun10/manufac23.txt', sep=,) names(manufac23)-c(x, y, t) manufac23-read.table('d:/dissertation/dailynew/jun10/manufac23.txt', sep=,) names(manufac23)-c(x, y, t) bur2 - stkhat(manufacpt, manufac23$t, countiespt, c(34060, 37712), seq(1,60,60), seq(91,1005,60)) oldpar - par(mfrow=c(2,1)) plot(bur2$s, bur1$ks, type=l, xlab=distance, ylab=Estimated K, main=spatial K function) plot(bur2$t, bur2$kt, type=l, xlab=time, ylab=Estimated K, main=temporal K function) par(oldpar) [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Roger Bivand Economic Geography Section, Department of Economics, Norwegian School of Economics and Business Administration, Breiviksveien 40, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93 e-mail: [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] probabilistic neural networks
Hi, I'm working on a classification problem and one of the methods I'd like to use are neural networks. I've been using nnet to build a classification network. However I would like to have the probabilities associated with the prediction. Are there any implementations of probabilistic neural networks available in R? thanks, --- Rajarshi Guha [EMAIL PROTECTED] http://jijo.cjb.net GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE --- Artificial intelligence has the same relation to intelligence as artificial flowers have to flowers. -- David Parnas __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] probabilistic neural networks
That's not what a `probabilistic neural network' is. However, nnet already does what you ask: do read the references as the posting guide asks. On Fri, 11 Jun 2004, Rajarshi Guha wrote: I'm working on a classification problem and one of the methods I'd like to use are neural networks. I've been using nnet to build a classification network. However I would like to have the probabilities associated with the prediction. Are there any implementations of probabilistic neural networks available in R? -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Error when I try to build / plot a tree using rpart()
Hi, I am using the rpart package to build a classification tree. I did manage to build a tree with data on a previous project. However, when attampting to build a tree on a project I am working on, I seem to be getting the error shown below: nhg3.rp - rpart(profitresp ~., nhg3, method=class) plot(nhg3.rp, branch=0.4, uniform=T); text(nhg3.rp, digits=3) Error in yval[, 1] : incorrect number of dimensions The distribution of my binary dependent variable is: table(nhg$profitresp) 01 3703 4360 I am using 105 potential predictor variables. I am trying to come up with a decision rule to identify profitable responders from non-responders to a mailing. Some other details are: summary(nhg3.rp) Call: rpart(formula = profitresp ~ ., data = nhg3, method = class) n= 8063 CP nsplit rel error 1 0.009451796 0 1 Error in yval[, 1] : incorrect number of dimensions print(nhg3.rp) n= 8063 node), split, n, loss, yval, (yprob) * denotes terminal node 1) root 8063 3703 1 (0.4592583 0.5407417) * printcp(nhg3.rp) Classification tree: rpart(formula = profitresp ~ ., data = nhg3, method = class) Variables actually used in tree construction: character(0) Root node error: 3703/8063 = 0.45926 n= 8063 CP nsplit rel error 1 0.0094518 0 1 Any help is appreciated. Thanks much, Jude Ryan __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] ROC for threshold value, biometrics
[EMAIL PROTECTED] wrote: Hello, I am just a beginner of R 1.9.0. I try to construct a predictive score for the development of liver cancer in cirrhotic patients. So dependant variable is binanry (cancer yes or no). Independant variables are biological data. The aim is to find out a cut-off value which differentiate (theoratically) from normal to pathological state for each biological data. A binary endpoing is not a good choice for this problem, as the time to diagnosis is very important. Unless you only have a biopsy at a single fixed time (e.g., 5 years post study entry) it would be good to consider for example a Cox proportional hazards model. And there are many reasons for not using a cutoff, as detailed in my book Regression Modeling Strategies. How can I step in procedue to get a cut-off value (threshold) for each variable? I think I should try by ROC. But I'm not sure. If so, someone can lead me? Besides not recommending the use of cutoffs on an overall predicted value, I think that using cutoffs based on separate analyses of predictors is even worse. Frank If not, someone can advice me how ? Any advice will be cordially aprreciated. Tin Tin Htar Myint Research assistant Liver unit Jean Verdier Hospital, Bondy France __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] memory allocation and interrupts
Hi, A recent discussion on the list about tryCatch and signals made me think about memory allocation and signals in C extension modules. What happens to the memory allocated by R_alloc and Calloc if the user pressed Ctr-C during the call? R-ext doesn't seem to discuss this. I'd guess that R_alloc is interrupt-safe while Calloc is not, but I am not sure. In any case a paragraph in R-ext on signals would be helpful. While looking around for interrupts handling in the code I came across BEGIN_SUSPEND_INTERRUPTS macro in Defn.h file. Unfortunately, it is not available via R.h or Rinternals.h. Am I missing something? If not, could future releases of R make it available via, say, Rinternals.h? Thanks, Vadim [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Re: R-help Digest, Vol 16, Issue 11
[EMAIL PROTECTED] writes: I make a study in health econometrics and have a categorical dependent variable (take value 1-5). I would like to fit an ordered probit or ordered logit but i didn't find a command or package who make that. Does anyone know if it's exists ? Try polr() from the MASS package (part of the standard install, also available from r-project.org) Or try vglm() from Thomas Yee's VGAM package (in beta, available from Yee's web page, which you can find by googling Yee and VGAM) -- Alan B. Cobo-Lewis, Ph.D. (207) 581-3840 tel Department of Psychology(207) 581-6128 fax University of Maine Orono, ME 04469-5742[EMAIL PROTECTED] http://www.umaine.edu/visualperception __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] Error when I try to build / plot a tree using rpart()
You didn't get a tree. The output of print() tells you that you only have the root node. You may need to adjust some of the parameters with rpart(..., control=rpart.control(...)). See ?rpart.control. HTH, Andy From: Jude Ryan Hi, I am using the rpart package to build a classification tree. I did manage to build a tree with data on a previous project. However, when attampting to build a tree on a project I am working on, I seem to be getting the error shown below: nhg3.rp - rpart(profitresp ~., nhg3, method=class) plot(nhg3.rp, branch=0.4, uniform=T); text(nhg3.rp, digits=3) Error in yval[, 1] : incorrect number of dimensions The distribution of my binary dependent variable is: table(nhg$profitresp) 01 3703 4360 I am using 105 potential predictor variables. I am trying to come up with a decision rule to identify profitable responders from non-responders to a mailing. Some other details are: summary(nhg3.rp) Call: rpart(formula = profitresp ~ ., data = nhg3, method = class) n= 8063 CP nsplit rel error 1 0.009451796 0 1 Error in yval[, 1] : incorrect number of dimensions print(nhg3.rp) n= 8063 node), split, n, loss, yval, (yprob) * denotes terminal node 1) root 8063 3703 1 (0.4592583 0.5407417) * printcp(nhg3.rp) Classification tree: rpart(formula = profitresp ~ ., data = nhg3, method = class) Variables actually used in tree construction: character(0) Root node error: 3703/8063 = 0.45926 n= 8063 CP nsplit rel error 1 0.0094518 0 1 Any help is appreciated. Thanks much, Jude Ryan __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html