[R] best.svm

2005-05-23 Thread Stephen Choularton
Hi I am trying to fit an svm to predict speech recognition errors. I am using best.svm like this: svm.model = best.svm(data[1:3000,1:23],data[1:3000,24],tunecontrol = tune.control()) I got this: > print(svm.model) Call: best.svm(x = data[1:3000, 1:23], tunecontrol = tune.control(), dat

Re: [R] 21 CFR Part 11 Compliance and R

2005-05-23 Thread A.J. Rossini
21 CFR Part 11 is mostly about data audit trails (tracking changes and electronic signatures) and validation of software. Most of this involves documentation and the creation of documentation LOCALLY at YOUR site, regarding YOUR processes and operating procedures. R satisfies most of what is need

Re: [R] How to convert a character string to a number

2005-05-23 Thread Stephen D. Weigand
Dear Andreas, On May 23, 2005, at 4:56 AM, Kraft, Andreas wrote: Hi everyone, I have a simple problem but don´t know how to solve it. I read in a table from a text file that looks like that: -3,932200E-01 -2,00E-01 4,95E-02 -3,932099E-01 -1,00E-01 3,96E-02 ... -3,9313

RE: [R] Returning from a function

2005-05-23 Thread Liaw, Andy
Use invisible(NULL) as the last line. Andy > From: Laura Holt > > Hello again. > > I have a function that plots a series and adds some > interesting items to the > plot. > > Fair enough. > > The last statement in the function is > return() > > When the function is executed, NULL appears a

[R] Returning from a function

2005-05-23 Thread Laura Holt
Hello again. I have a function that plots a series and adds some interesting items to the plot. Fair enough. The last statement in the function is return() When the function is executed, NULL appears at the end, which is ok. Is there any way to prevent NULL from appearing, or is that just as

Re: [R] website reference for building R packages

2005-05-23 Thread Suresh Krishna
it is the first link if you type "making packages" into the google search box here: http://maths.newcastle.edu.au/~rking/R/ -s. Laura Holt wrote: Hi R People: A few weeks ago, someone put a link to a website for "how to" for building R packages. It was very nice. But of course, I have

[R] website reference for building R packages

2005-05-23 Thread Laura Holt
Hi R People: A few weeks ago, someone put a link to a website for "how to" for building R packages. It was very nice. But of course, I have misplaced the link. Does anyone still have that, please? It was someone from the University of Chicago, I believe. Thanks in advance. Sincerely, La

[R] contourLines() starts a plot device

2005-05-23 Thread Pierre Kleiber
I want to use contourLines() to get contour line coordinate vectors, but I don't want to make a plot. However contourLines() insists on opening a graphics device. Is there a way tell it not to do this? > version platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-

[R] lme4 package and importIntoEnv errors

2005-05-23 Thread Patrick Connolly
I've used packages for some years now and seldom had any trouble using the tgz files. Now I've come across something I've never seen before. > version _ platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major2 minor1.0 year 2005 month

RE: [R] How to break an axis?

2005-05-23 Thread Mulholland, Tom
I think you may wish to look at the plotrix package, assumming that you have taken care of the issues involved in breaking an axis and that your plots don't result in misleading information. I think to use the axis break you would have to calculate your own labels and rescale the data, as it lo

[R] How to break an axis?

2005-05-23 Thread Bo Peng
Dear list, I need to plot four almost horizontal lines with y-values around 1,3,4, 400. If I plot them directly, the first three lines will be indiscernible so I am thinking of breaking y-axis into two parts, one with range (0,5), another (395,400). Is there an easy way to do this? I can think of

[R] Re: S4 method inheritance

2005-05-23 Thread Ross Boylan
On Mon, 2005-05-23 at 14:41 -0700, Ross Boylan wrote: > Finally, I'm a bit concerned that one article mentioned that S4 > inheritance, in practice, is used mostly for data, not methods (Thomas > Lumley, R News 4(1), June 2004: p. 36). Am I going down a road I > shouldn't travel? > Hmm, mayb

RE: SV: [R] Documentation of S3 and S4 classes, inheritance

2005-05-23 Thread Berton Gunter
I don't think you quite said what you meant ... > I thought if you wanted C to inherit from A and B you could, in S3, > just >class(aCObject)<- c('C', 'A', 'B') > While the ordering is arbitrary, that's usually the case with multiple > inheritance. > I assume you meant, "I thought if you

RE: [R] R annoyances

2005-05-23 Thread Brahm, David
Bogdan Romocea <[EMAIL PROTECTED]> wrote: > Hypothetically, if whatever=T/F were forbidden and only > whatever=TRUE/FALSE were allowed, all the code could be fixed with > a simple sed script: [deleted] As Bogdan is lobbying hard for disallowing T/F, I wanted to speak up for the other side. Please

Re: SV: [R] Documentation of S3 and S4 classes, inheritance

2005-05-23 Thread Ross Boylan
On Tue, 2005-05-24 at 00:31 +0200, Søren Højsgaard wrote: > >One of the things that S3 is lacking is clearly multiple inheritance, I thought if you wanted C to inherit from A and B you could, in S3, just class(aCObject)<- c('C', 'A', 'B') While the ordering is arbitrary, that's usually the ca

SV: [R] Documentation of S3 and S4 classes, inheritance

2005-05-23 Thread Søren Højsgaard
I am sure that I do not have the answer to your question - but I would like to add to your views regarding the S4-issue. I've been involved in the gRbase package for graphical modelling in R. The first version was implemented in S4 but now we have made a roll-back to using S3 methods. While,

Re: [R] comparing glm models - lower AIC but insignificant coefficients

2005-05-23 Thread Kjetil Brinchmann Halvorsen
Constantinos Antoniou wrote: Hello, I am a new R user and I am trying to estimate some generalized linear models (glm). I am trying to compare a model with a gaussian distribution and an identity link function, and a poisson model with a log link function. My problem is that while the gau

Re: [R] Documentation of S3 and S4 classes, inheritance

2005-05-23 Thread Gabor Grothendieck
On 5/23/05, Ross Boylan <[EMAIL PROTECTED]> wrote: > I'd like to have a class A that computes a likelihood, and a subclass B > that computes the same likelihood by sometimes throws in an additional > term (B includes measurement error). > > So B's likelihood needs to call A's, and then (sometimes)

Re: [R] Calling R from R and specifying "wait until script is finished"

2005-05-23 Thread Don MacQueen
I don't know about efficient, but here is a way that I find to be practical, with around 100 R scripts. I create a master R script (I call it "Runall.r"). It begins like this: ## Execute me with R --save < Runall.r >& Runall.log hc <- TRUE if (hc) sink('Runall.out') t0runall <- Sys.time() ca

[R] Documentation of S3 and S4 classes, inheritance

2005-05-23 Thread Ross Boylan
I'd like to have a class A that computes a likelihood, and a subclass B that computes the same likelihood by sometimes throws in an additional term (B includes measurement error). So B's likelihood needs to call A's, and then (sometimes) multiply by an additional term. It sounds as if, in the S3

Re: [R] Error handling

2005-05-23 Thread Gabor Grothendieck
On 5/23/05, Carsten Steinhoff <[EMAIL PROTECTED]> wrote: > Hi, > > I have written an R-Procedure that automatically does a ML-Fit for some > datasets to a few > selected distributions. After any optimization the function writes the > estimated parameters into a variable. > My problem is now that s

[R] Error handling

2005-05-23 Thread Carsten Steinhoff
Hi, I have written an R-Procedure that automatically does a ML-Fit for some datasets to a few selected distributions. After any optimization the function writes the estimated parameters into a variable. My problem is now that sometimes the optimization failes and my program stops with an error mes

RE: [R] 21 CFR Part 11 Compliance and R

2005-05-23 Thread Berton Gunter
To further add to and perhaps clarify Frank's remark: 21 CFR Part 11 defines certain requirements for electronics records. A general requirement relevant for statistical software used in submissions is, I presume (quoted): " Persons who use closed systems to create, modify, maintain, or transmi

Re: [R] 21 CFR Part 11 Compliance and R

2005-05-23 Thread Frank E Harrell Jr
Richard Haney wrote: I have used S-PLUS, R, MATLAB and SAS for many years, and I am actually quite happy to use any of these four languages. The reason may in part involve my using the various languages for the purposes to which they seem most suited. Hence there are many things for which I

Re: [R] transform normally distributed random terms to gamma distributed random terms

2005-05-23 Thread Spencer Graves
1. The help page for ?rgamma says E(g) = shape*scale = shape/rate and var(g) = shape*scale^2 = shape/rate^2. These are different from what I read in your email. Could you please check the help page more carefully? 2. If this does not solve your problem, PLEASE do read the posting gu

[R] comparing glm models - lower AIC but insignificant coefficients

2005-05-23 Thread Constantinos Antoniou
Hello, I am a new R user and I am trying to estimate some generalized linear models (glm). I am trying to compare a model with a gaussian distribution and an identity link function, and a poisson model with a log link function. My problem is that while the gaussian model has significantly

[R] 21 CFR Part 11 Compliance and R

2005-05-23 Thread Richard Haney
I have used S-PLUS, R, MATLAB and SAS for many years, and I am actually quite happy to use any of these four languages. The reason may in part involve my using the various languages for the purposes to which they seem most suited. Hence there are many things for which I would not use SAS or

[R] transform normally distributed random terms to gamma distributed random terms

2005-05-23 Thread Stefan Pohl
Hi, I have normally distributed random terms u~N(0,1). I want to get gamma distributed random terms g~(scale,shape) with E(g)=1=shape/scale and var(g)=theta=1/scale=1/shape. How can I reach my goal? The following way doesn't work: use the distribution function of u to get U(0,1)- distributed

[R] dist equivalent

2005-05-23 Thread sgoodman
Hi, The goal is to use Pearson's Phi coefficient to create a similarity matrix from a matrix. The problem is that the DIST command doesn't do it, and I don't know how manipulate the R language well enough to create a substitute. The question is simple: what is a basic way of using custom formu

Re: [R] installing R and Rcmdr onMacOS 10.3.9

2005-05-23 Thread Rob J Goedman
Hi John, It does work on my Mac. I'm helping Karla to get it running on hers. Rob On May 23, 2005, at 11:32 AM, John Fox wrote: Dear Karla, It's likely that you don't have Tcl/Tk installed on your Mac. I know that it's possible to get the Rcmdr working on a Mac, but that doing so require

RE: [R] installing R and Rcmdr onMacOS 10.3.9

2005-05-23 Thread John Fox
Dear Karla, It's likely that you don't have Tcl/Tk installed on your Mac. I know that it's possible to get the Rcmdr working on a Mac, but that doing so requires some additional steps. I'm not a Mac user, so I'm afraid that I can't be of much direct help. If someone who's using the Rcmdr on a Mac

RE: [R] colors and palettes and things...

2005-05-23 Thread John Fox
Dear Jeff, Some time ago, Don McQueen posted to r-help a nice function for displaying the named colours. You'll find it at . As well, if you're using R for Windows, the various named colours are defined in the file rgb.txt in R's etc dire

[R] Left truncation in shared frailty models with time-varying covariates

2005-05-23 Thread Stefan Pohl
Hi! I want to estimate a shared gamma frailty model with left truncated data. I use a parametric baseline hazard so that I can use simple ML estimation. As I have a big data set it is ok to assume piecewise constant baseline hazards. As my data are left truncated I have modified the definition

RE: [R] colors and palettes and things...

2005-05-23 Thread bogdan romocea
1. I faced the same issue and came up with the code below. 2. See rainbow(). allcol <- colors() png("Rcolors.png",width=1100,height=3000) par(mai=c(0.4,0.5,0.3,0.2),omi=c(0.2,0,0,0),cex.axis=0.1,pch=15,bg="white") plot(1,1,xlim=c(1,10),ylim=c(1,66),col=allcol[1],cex=4) axis(1,at=NULL,labels=FALSE

[R] Can't reproduce clusplot princomp results.

2005-05-23 Thread Thomas M. Parris
Dear R folk: Perhaps I'm just dense today, but I am having trouble reproducing the principal components plotted and summarized by clusplot. Here is a brief example using the pluton dataset. clusplot reports that the first two principal components explain 99.7% of the variability. But this is no

[R] installing R and Rcmdr onMacOS 10.3.9

2005-05-23 Thread Karla Van Meter
I have been trying to install the new, patched R 2.1.0a along with the Rcmdr on my mac. I got the basic R package installed, but in Project Manager, the tcltk package will not install. When I downloaded the Rcmdr binary package from the Berkeley site, it did not show up on the package inst

RE: [R] colors and palettes and things...

2005-05-23 Thread Tuszynski, Jaroslaw W.
Colors predefined in R follow closely colors predefined in in HTML language. See: http://users.rcn.com/giant.interport/COLOR/1ColorSpecifier.html http://www.brobstsystems.com/colors1.htm http://www.geocities.com/html4kids/colors.htm And probably countless other websites defining them. Jarek

RE: [R] Trouble with drplot

2005-05-23 Thread Eugene.Glover
I suppose that was the problem. I had my control values included as concentration of 0. My impression was that if I put "no fit" in the OK column they would be ignored when graphing. However, I guess that is not the case, because when I took them out the plot worked. Thanks a lot. Gene -Or

Re: [R] Backslash

2005-05-23 Thread Duncan Murdoch
Josef Eschgfaeller wrote: Why sometimes one has to put a double backslash in regular expressions, but often simple backslashes work too? Is only a \ required for giving a metacharacter its usual meaning? The general reason is that both R and grep use \ as an escape character. If you want to s

Re: [R] Trouble with drplot

2005-05-23 Thread Aleš Žiberna
Does your data (that you want to plot have any "Inf" or "-Inf" values? Ales Ziberna - Original Message - From: <[EMAIL PROTECTED]> To: Sent: Monday, May 23, 2005 5:16 PM Subject: [R] Trouble with drplot Hi, I am a newbie with R, so I hope my question isn't too stupid. I am trying t

[R] colors and palettes and things...

2005-05-23 Thread Jeff D. Hamann
After trying to find if there was a color picker in the FAQs and the help, I thought I would send a post here. I was overwhelmed with all the wonderful color choices R has predefined (discovered after typing in colors()) but can't figure out what they all (by name) look like. Is there a color picke

[R] R Reference Card (especially useful for Newbies)

2005-05-23 Thread Berton Gunter
Newbies (and others!) may find useful the R Reference Card made available by Tom Short and Rpad at http://www.rpad.org/Rpad/Rpad-refcard.pdf or through the "Contributed" link on CRAN (where some other reference cards are also linked). It categorizes and organizes a bunch of R's basic, most used

[R] Trouble with drplot

2005-05-23 Thread Eugene.Glover
Hi, I am a newbie with R, so I hope my question isn't too stupid. I am trying to generate dose-response curves using the "drfit" package. I have formatted my CSV files to the correct format, and have no trouble running drfit to get a summary of my data. The problem is that when I try to use "drp

Re: [R] formals or args question

2005-05-23 Thread Dimitris Rizopoulos
formals() returns a list, so you could try this: a <- function(p, r) p + r names(formals(a)) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32

Re: [R] formals or args question

2005-05-23 Thread BJ
Ahh. Thanks a lot! works great. :-p Ales Ziberna wrote: names(formals(fun)) You need the names of the elements of the list formals produces, not their content! Ales Ziberna - Original Message - From: "BJ" <[EMAIL PROTECTED]> To: Sent: Monday, May 23, 2005 4:45 PM Subject: [R] form

Re: [R] formals or args question

2005-05-23 Thread Ales Ziberna
names(formals(fun)) You need the names of the elements of the list formals produces, not their content! Ales Ziberna - Original Message - From: "BJ" <[EMAIL PROTECTED]> To: Sent: Monday, May 23, 2005 4:45 PM Subject: [R] formals or args question Hello again, thank you again for

[R] formals or args question

2005-05-23 Thread BJ
Hello again, thank you again for all of your help. I am trying to get the arguments for a function, in a way that I can handle them. If I do args(fun), it doesnt really do what I want. If I use formals(fun) i get output like: $a $r $s Now, lthis is supposedly a list, but if i say formals

Re: [R] constraints

2005-05-23 Thread Thomas Lumley
On Sun, 22 May 2005, Arne Henningsen wrote: constrOptim by two inequality constraints: a - b >= 0 and b - a >= 0 However, I guess that the solver prefers the first way ;-) It is not possible. The starting value must be in the interior of the feasible region (because the constraints are im

Re: [R] comparison operator, decimals, and signif()

2005-05-23 Thread Thomas Lumley
On Sat, 21 May 2005, Nick Drew wrote: What does signif() do to my object called "testMean" so that the comparison now evaluates to TRUE? signif(testMean, 3) == 82.9 [1] TRUE It rounds to 3 significant digits. An even more reliable approach is round(testMean*10) == 829 since 829 is an

[R] dse1 package simulate example

2005-05-23 Thread Samuel E. Kemp
Hi, I am trying to use the simulate function in the dse1 package to generate VAR (multivariate) models. I *think* the first example gives a simple VAR(2) time series, here is the code. > AR <- array(c(1, .5, .3, 0, .2, .1, 0, .2, .05, 1, .5, .3) ,c(3,2,2)) > VAR <- ARMA(A=AR, B=diag(1

[R] R 2.1 installation on Mac OS 10.2

2005-05-23 Thread Georg Otto
Hi, I am trying to install R 2.1 from source on a Mac 10.2.8, Darwin Kernel Version 6.8 According to the FAQ at http://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html I proceeded in the following manner: ./configure --with-blas='-framework vecLib' --with-lapack --with-aqua This resulte

Re: [R] Maps, Eastern Europe

2005-05-23 Thread Roger Bivand
Ray Brownrigg wrote: > Unfortunately the world databases for the maps package are very old > (early 1990's) and have not been updated since, except for minor > typographical errors in country names. Note that Czechoslovakia is > there (as is USSR!). Also, it currently satisfies my needs, which i

Re: [R] Dickey-Fuller Test

2005-05-23 Thread Clark Allan
hello i ammended the code. it was in some package. dont know which? try tseries. this might be of help. adf.test.1<-function (x,kind=3,k = trunc((length(x)- 1)^(1/3))) { #kind = the kind of test undertaken #kind = 1 ==> No constant no trend #kind = 2 ==> Constant #kind = 3 ==> Constant and tre

Re: [R] Dickey-Fuller Test

2005-05-23 Thread Miguel A. Arranz
tseries (adf.test) On Monday 23 May 2005 12:27, Amir Safari wrote: > Hi All , > Could you please tell using which library ,Dickey-Fuller Test can be run? > Thanks a lot > > __ > > > > [[alternative HTML version deleted]] > > __

Re: [R] Dickey-Fuller Test

2005-05-23 Thread Achim Zeileis
On Mon, 23 May 2005 03:27:49 -0700 (PDT) Amir Safari wrote: > > > Hi All , > Could you please tell using which library, Dickey-Fuller Test can be > run? Thanks a lot That depends: in which *library* have you installed the tseries *package*? (Look at the archives for the difference between lib

[R] Dickey-Fuller Test

2005-05-23 Thread Amir Safari
Hi All , Could you please tell using which library ,Dickey-Fuller Test can be run? Thanks a lot __ [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.

[R] How to convert a character string to a number

2005-05-23 Thread Kraft, Andreas
Hi everyone, I have a simple problem but don´t know how to solve it. I read in a table from a text file that looks like that: -3,932200E-01 -2,00E-01 4,95E-02 -3,932099E-01 -1,00E-01 3,96E-02 -3,932000E-01 0,00E+00 3,96E-02 -3,931899E-01

[R] Problem with label name in mosaics plot

2005-05-23 Thread Muhammad Subianto
Dear all R-help, I have a problem with label name in mosaics plot if I use more 4 variables. Let see with my toy example. library(vcd) toy.mosaics <- array(c(96,44,1,138,64,2,117,56,6,75,48,5,72,49,6,83,60,8,140, 43,1,171,65,4,152,58,9,101,51,9,102,58,10,111,67,16,24,

[R] confidence interval and cross validation

2005-05-23 Thread Marta Rava
I've obstained the mean square error of prediction, using a 10 fold cross validation for a linear multiple regression model (I've used errortest, from package ipred), how can I calculate the confidence interval? And, could I use test set of cross validation to calculate correlation and concordan

[R] Backslash

2005-05-23 Thread Josef Eschgfaeller
Why sometimes one has to put a double backslash in regular expressions, but often simple backslashes work too? Is only a \ required for giving a metacharacter its usual meaning? --- u=grep('\\{[\\-u]x',a,perl=T) # equivalent to u=grep('\{[\-u]x',a,perl=

[R] using lme in csimtest

2005-05-23 Thread René Eschen
Hi group, I'm trying to do a Tukey test to compare the means of a factor ("treatment") with three levels in an lme model that also contains the factors "site" and "time": model = response ~ treatment * (site + time) When I enter this model in csimtest, it takes all but the main factor "treatm

Re: [R] skewness and kurtosis in e1071 correct?

2005-05-23 Thread Campbell
This is probably an issue over definitions rather than the correct answer. To me skewness and kurtosis are functions of the distribution rather than the population, they are equivalent to expectation rather than mean. For the normal distribution it makes no sense to estimate them as the distribut

[R] Re: Finding the right number of clusters

2005-05-23 Thread Mike White
Philip I have been using the kgs function in the maptree package, although you still need to decide on a weighting factor. Mike White __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!