[R] Differentiation

2007-08-20 Thread Shubha Vishwanath Karanth
Hi, Could anyone tell me what is the command used in R to do 1. Differentiation 2. Newton Raphson method (Numerical Analysis in general...) Are there any packages separately for this? Thanks for your help! BR, Shubha [[alternative HTML version deleted]]

[R] Labelling certain points on the x-axis

2007-08-20 Thread squall44
Hello, I created an empirical distribution function: x = c(1.6,1.8,2.4,2.7,2.9,3.3,3.4,3.4,4,5.2) F2.5 - ecdf(x) plot(F2.5, verticals= TRUE, do.p = TRUE, lwd=3, ylab = f(x), xlab = x, main = Figur 2.5 Empirische Verteilfunktion, xlim = c(1,5.5))

Re: [R] Differentiation

2007-08-20 Thread Uwe Ligges
Shubha Vishwanath Karanth wrote: Hi, Could anyone tell me what is the command used in R to do 1.Differentiation See ?deriv and note that R is numerical software and only has limited capabilities for symbolic mathematics such as differentiation. 2.Newton Raphson method

Re: [R] Restricted VAR parameter estimation

2007-08-20 Thread Pfaff, Bernhard Dr.
Hello Megh, in principle you can do OLS on an equation-per-equation basis. However, in this case the estimator might be asymptotically inefficient. One can use FGLS instead. This is outlined for instance in: Helmut Luetkepohl, 2007. Econometric Analysis with Vector Autoregressive Models,

[R] Question about writing some code

2007-08-20 Thread squall44
Just a short question: Why does this work: x = c(1.6,1.8,2.4,2.7,2.9,3.3,3.4,3.4,4,5.2) F26-boxplot(x, add=FALSE, horizontal=TRUE, main=Figur 2.6 Boxplot, axes=FALSE) ...but this doesn't... x = c(1.6,1.8,2.4,2.7,2.9,3.3,3.4,3.4,4,5.2) F26 - boxplot(x) plot(F26,

Re: [R] Building Packages with AnnBuilder

2007-08-20 Thread Georg Otto
jakob bleier [EMAIL PROTECTED] writes: I got some Problems building an Annotation-Package with AnnBuilder. Not using the function ABPkgBuilder(), but just parts of it to create a package without connecting to the servers, I managed to create a Package, but it seems to be empty. R recognizes

[R] Q: combine 2 data frames with missing values

2007-08-20 Thread Tom Willems
hello R ussers, i have the same problem with my data, for aal the different variables, i have the same number of cases, but the are often out of detectionlimits so they produce na's . so the data looks like this: casevar1var2var3var4 ... 1 9 9 13 11 2

Re: [R] Differentiation

2007-08-20 Thread nalluri pratap
try library(numDeriv) ?genD Pratap Shubha Vishwanath Karanth [EMAIL PROTECTED] wrote: Hi, Could anyone tell me what is the command used in R to do 1. Differentiation 2. Newton Raphson method (Numerical Analysis in general...) Are there any packages separately for this?

Re: [R] Differentiation

2007-08-20 Thread Paul Smith
On 8/20/07, nalluri pratap [EMAIL PROTECTED] wrote: try library(numDeriv) ?genD Pratap Shubha Vishwanath Karanth [EMAIL PROTECTED] wrote: Hi, Could anyone tell me what is the command used in R to do 1. Differentiation 2. Newton Raphson method (Numerical Analysis in

Re: [R] Labelling certain points on the x-axis

2007-08-20 Thread Uwe Ligges
squall44 wrote: Hello, I created an empirical distribution function: x = c(1.6,1.8,2.4,2.7,2.9,3.3,3.4,3.4,4,5.2) F2.5 - ecdf(x) plot(F2.5, verticals= TRUE, do.p = TRUE, lwd=3, ylab = f(x), xlab = x, main = Figur 2.5 Empirische Verteilfunktion,

Re: [R] Question about writing some code

2007-08-20 Thread Uwe Ligges
squall44 wrote: Just a short question: Why does this work: x = c(1.6,1.8,2.4,2.7,2.9,3.3,3.4,3.4,4,5.2) F26-boxplot(x, add=FALSE, horizontal=TRUE, main=Figur 2.6 Boxplot, axes=FALSE) boxplot returns some information on the boxplot, but the result

Re: [R] Does anyone.... worth a warning?!? No warning at all

2007-08-20 Thread Tom Willems
dear Mathew mean is a Generic function mean(x...) in wich x is a data object, like a data frame a list a numeric vector... so in your example it only reads the first character and then reports it. try x = c(1,1,2) mean(x) kind regards, Tom Disclaimer: click here [[alternative

[R] Interweaving cell entries from 2 columns

2007-08-20 Thread jenny
Hi, how do I interweave 2 columns of data into a single column? See illustration below. Thx-jenny I have 2 columns of data Col1 Col21 2 3 45 6 7 89 10 I want to create a new column with interlocking cell centries12345678910 Get the new Windows

[R] LDA decission boundaries

2007-08-20 Thread Dani Valverde
Hello, I would like to plot the results of a LDA analysis plotting the discriminant scores with the decission boundaries on it with rggobi. I have GGobi already installed on my computer. I have three classes, so the plot would be LD1xLD2 plus the decission boundaries. Here there is the code I use

Re: [R] Interweaving cell entries from 2 columns

2007-08-20 Thread Ted Harding
On 20-Aug-07 09:49:08, jenny wrote: Hi, how do I interweave 2 columns of data into a single column? See illustration below. Thx-jenny I have 2 columns of data Col1 Col21 2 3 45 6 7 89 10 I want to create a new column with interlocking cell

Re: [R] LDA decission boundaries

2007-08-20 Thread Rod
2007/8/20, Dani Valverde [EMAIL PROTECTED]: Hello, I would like to plot the results of a LDA analysis plotting the discriminant scores with the decission boundaries on it with rggobi. I have GGobi already installed on my computer. I have three classes, so the plot would be LD1xLD2 plus the

Re: [R] Interweaving cell entries from 2 columns

2007-08-20 Thread Jim Lemon
jenny wrote: Hi, how do I interweave 2 columns of data into a single column? See illustration below. Thx-jenny I have 2 columns of data Col1 Col21 2 3 45 6 7 89 10 I want to create a new column with interlocking cell centries12345678910 Get

Re: [R] Labelling certain points on the x-axis

2007-08-20 Thread Jim Lemon
squall44 wrote: Hello, I created an empirical distribution function: x = c(1.6,1.8,2.4,2.7,2.9,3.3,3.4,3.4,4,5.2) F2.5 - ecdf(x) plot(F2.5, verticals= TRUE, do.p = TRUE, lwd=3, ylab = f(x), xlab = x, main = Figur 2.5 Empirische Verteilfunktion,

[R] Select rows of matrix

2007-08-20 Thread Van Wyk, Jaap
Hi I would appreciate if anyone could help me with an elegant solution of the following: I have a matrix that contain a small number of -Inf values. How can form a new matrix from the old one that excludes all the rows with -Inf values ? Thank you. Jacob Dept of Statistics University

Re: [R] Q: combine 2 data frames with missing values

2007-08-20 Thread Gabor Grothendieck
Try this: Lines - casevar1var2var3 var4 1 9 9 13 11 2 15 9 15 13 3 na na 12 9 4 8 6 na na 5 14 10 na na 6 20 15 17 15 # replace with DF -

Re: [R] Select rows of matrix

2007-08-20 Thread Dimitris Rizopoulos
try this: mat - matrix(rnorm(20*10), 20, 10) mat[sample(200, 10)] - -Inf mat mat[apply(is.finite(mat), 1, all), ] I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35,

[R] library(fCalendar) timeDate(12.03.2005,format=%d.%m.%Y)

2007-08-20 Thread Ola Lindqvist
Dear R users, I have problem with the library fCalendar. I am not using the US standard format notations. It seems like it is not possible to have different format than the US standards. Anyone how knows a way to go around this problem? Here is the code I enter: myDate = 12.03.2005

Re: [R] library(fCalendar) timeDate(12.03.2005, format=%d.%m.%Y)

2007-08-20 Thread Duncan Murdoch
On 8/20/2007 9:26 AM, Ola Lindqvist wrote: Dear R users, I have problem with the library fCalendar. I am not using the US standard format notations. It seems like it is not possible to have different format than the US standards. Anyone how knows a way to go around this problem? Here is

[R] Ask for functions to obtain partial R-square (squared partial correlation coefficients)

2007-08-20 Thread Ye Xingwang
The partial R-square (or coefficient of partial determination, or squared partial correlation coefficients) measures the marginal contribution of one explanatory variable when all others are already included in multiple linear regression model. The following link has very clear explanations on

Re: [R] Ask for functions to obtain partial R-square (squared partial correlation coefficients)

2007-08-20 Thread Frank E Harrell Jr
Ye Xingwang wrote: The partial R-square (or coefficient of partial determination, or squared partial correlation coefficients) measures the marginal contribution of one explanatory variable when all others are already included in multiple linear regression model. The following link has very

[R] R on a flash drive

2007-08-20 Thread Erin Hodgess
Dear R People: Has anyone run R from a flash drive, please? If so, how did it work, please? Thanks in advance! Sincerely, Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: [EMAIL PROTECTED]

Re: [R] statdataml question

2007-08-20 Thread David Meyer
Bryan: Hi, I was wondering if Statdataml is currently the preferred way to represent statistical data in XML in R. This is hard to tell. We think it is a _possible_ way doing that. Do you have some alternatives in mind? And also if the Statdataml api provides ways to load the XML as a

Re: [R] R on a flash drive

2007-08-20 Thread Vladimir Eremeev
This is a FAQ. http://cran.r-project.org/bin/windows/base/rw-FAQ.html#Can-I-run-R-from-a-CD-or-USB-drive_003f Erin Hodgess wrote: Dear R People: Has anyone run R from a flash drive, please? If so, how did it work, please? Thanks in advance! -- View this message in context:

Re: [R] R on a flash drive

2007-08-20 Thread John Kane
--- Erin Hodgess [EMAIL PROTECTED] wrote: Dear R People: Has anyone run R from a flash drive, please? If so, how did it work, please? Yes I run R, occasionally, on a USB with no problem on WindowsXP. It works well, albeit a bit more slowly than from the hard drive which is as you would

Re: [R] R on a flash drive

2007-08-20 Thread John Kane
Oops meant to send this to the list. --- John Kane [EMAIL PROTECTED] wrote: --- Erin Hodgess [EMAIL PROTECTED] wrote: Dear R People: Has anyone run R from a flash drive, please? If so, how did it work, please? Yes I run R, occasionally, on a USB with no problem on WindowsXP.

Re: [R] library(fCalendar) timeDate(12.03.2005, format=%d.%m.%Y)

2007-08-20 Thread Martin Becker
Dear Ola, I think you spotted a small bug in *package* fCalendar. Explicit specification should prevent autodetection of the date format, which is not the case for fCalendar v251.70, instead autodetection is done at least once (twice, if actually appropriate). With the following patch, things

Re: [R] recommended combo of apps for new user?

2007-08-20 Thread John Kane
--- hadley wickham [EMAIL PROTECTED] wrote: On 8/18/07, John Kane [EMAIL PROTECTED] wrote: I'm just starting to get a grasp on how R works so don't take my words too seriously but have a look at http://addictedtor.free.fr/graphiques/ for some idea of what R can do for publication

[R] Problem mit summaryBy: Group sums gives me incorrectly zero for one variable

2007-08-20 Thread Werner Wernersen
Hi, first I want to thank all of you for the quick aid which is provided here on the list during all times. Thanks a lot for that! Then, I have a problem using summaryBy which most probably is a problem of wrong use by me or the like: I use this command: summaryBy(total+total.inf~gr, aE,

Re: [R] Regulatory Compliance and Validation Issues

2007-08-20 Thread Cody Hamilton
Dear Thomas, Thank you for your reply. You are of course quite right - the R Foundation couldn't be responsible for any individually contributed package. I am curious as to how an orgainization operating in a regulated environment could safely use a contributed package. What if the

[R] trouble extracting R code from vignette using example from www.bioconductor.org

2007-08-20 Thread Mark W Kimpel
Not sure if this is an R or BioC question so will cross-post. I cannot extract R code from vignettes because system.file(doc, my.bioc.package) returns . I got this code directly off of http://www.bioconductor.org/docs/vignettes.html. A specific example using siggenes follows but I have tested

Re: [R] Any parser generator / code assistance for R?

2007-08-20 Thread Ali -
A- Hi, A- Is there any parser generator like www.antlr.org? Moreover, how does simple A- code assistance work currently in R? By 'simple code assistance' I meant A- things like: A- Object$MTAB -- Object$Method If you really meant a list with components or an S4 object with slots,

Re: [R] Problem mit summaryBy: Group sums gives me incorrectly zero for one variable

2007-08-20 Thread Werner Wernersen
Just an additional note: It must be a problem with the variable names. If I change total.inf to for instance ttotal.inf then it works as expected. What is the rule here? I would like to avoid such problems in the future. Thanks, Werner Hi, first I want to thank all of you for the quick

Re: [R] Any parser generator / code assistance for R?

2007-08-20 Thread Duncan Murdoch
On 8/20/2007 1:27 PM, Ali - wrote: A- Hi, A- Is there any parser generator like www.antlr.org? Moreover, how does simple A- code assistance work currently in R? By 'simple code assistance' I meant A- things like: A- Object$MTAB -- Object$Method If you really meant a list with components

[R] within-subject factors in lme

2007-08-20 Thread Gang Chen
I'm trying to run a 3-way within-subject anova in lme with 3 fixed factors (Trust, Sex, and Freq), but get stuck with handling the random effects. As I want to include all the possible random effects in the model, it would be something more or less equivalent to using aov fit.aov -

[R] Subscript

2007-08-20 Thread squall44
I have the following code: mtext(text=X[1]) How can I change [1] to be subscript? (see picture below) http://www.nabble.com/file/p12241351/subscript.gif subscript.gif Thanks for any help Tobias -- View this message in context: http://www.nabble.com/Subscript-tf4300665.html#a12241351 Sent

Re: [R] Problem with lsa package (data.frame) on Windows XP

2007-08-20 Thread Tine Stalmans
Dear Uwe, Thanks very much for your prompt reply. I include the following pieces of information, alongside a zip file with two folders where the corpus resides. ### ##Full reproducible code: library(lsa) # load training text

Re: [R] Subscript

2007-08-20 Thread Henrique Dallazuanna
mtext(text=expression(x[1])) -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40 S 49° 16' 22 O On 20/08/07, squall44 [EMAIL PROTECTED] wrote: I have the following code: mtext(text=X[1]) How can I change [1] to be subscript? (see picture below)

Re: [R] Regulatory Compliance and Validation Issues

2007-08-20 Thread Frank E Harrell Jr
Cody Hamilton wrote: Dear Thomas, Thank you for your reply. You are of course quite right - the R Foundation couldn't be responsible for any individually contributed package. I am curious as to how an orgainization operating in a regulated environment could safely use a contributed

Re: [R] Does anyone.... worth a warning?!? No warning at all

2007-08-20 Thread Rolf Turner
On 20/08/2007, at 9:54 PM, Tom Willems wrote: dear Mathew mean is a Generic function mean(x...) in wich x is a data object, like a data frame a list a numeric vector... so in your example it only reads the first character and then reports it. try x = c(1,1,2) mean(x)

[R] stupid question??

2007-08-20 Thread Lynn Disney
I am trying to run an R program in batch mode using R in Windows Server 2005. I have found several ways to do this, but keep getting the error message expecting a \n or ; in the command. The main command that I have tried is: R CMD BATCH filename.txt from within R But I have also used a variety

Re: [R] Does anyone.... worth a warning?!? No warning at all

2007-08-20 Thread Ted Harding
On 20-Aug-07 19:55:44, Rolf Turner wrote: On 20/08/2007, at 9:54 PM, Tom Willems wrote: dear Mathew mean is a Generic function mean(x...) in wich x is a data object, like a data frame a list a numeric vector... so in your example it only reads the first character and then reports it.

Re: [R] stupid question??

2007-08-20 Thread Charles C. Berry
On Mon, 20 Aug 2007, Lynn Disney wrote: I am trying to run an R program in batch mode using R in Windows Server 2005. I have found several ways to do this, but keep getting the error message expecting a \n or ; in the command. The main command that I have tried is: R CMD BATCH filename.txt

Re: [R] Regulatory Compliance and Validation Issues

2007-08-20 Thread Bert Gunter
FWIW: The few companies with which I'm familiar have significance resources -- i.e. software QC departments -- devoted to validating that internally developed code (e.g. SAS macros) used in submissions does what its claims to do. Extensive documentation of the code and the validation processs is

[R] Covariance of beta and lambda in geoR likfit

2007-08-20 Thread Rubén Roa-Ureta
Greetings comRades: Has anyone worked out a procedure to calculate the estimated covariance between the beta and lambda estimates in the likelihood-based geostatistical model implemented in package geoR? If so, please help me out by letting me know. Do I have reasons to expect that this

[R] polar.plot orientation and scale in plotrix

2007-08-20 Thread Tim Sippel
Hello all- I would like to orient my polar.plot (from package plotrix) so that the circular scale runs clockwise and the origin (ie. 0 degrees) starts at the top of the plot. The defaults of running the scale counter-clockwise and beginning with 90 degrees at the top of the graph seems

[R] rv package, rvnorm function

2007-08-20 Thread John P. Burkett
In an attempt to learn to use the rv package, I have been working through the examples in Jouni Kerman and Andrew Gelman's Using Random Variables to Manipulate and Summarize Simulations in R (July 4, 2007). I am using a Dell Precision 380n computer running Gentoo Linux and R 2.2.1 (the latest

Re: [R] Does anyone else think this might be worth a warning?!?

2007-08-20 Thread Matthew Walker
That sounds reasonable to me. For calls with more than three arguments mean.default() would then produce a warning. If there were only two or three arguments then I think they'd be bound to trim and na.rm and so no warning would appear. As Adaikalavan Ramasamy suggested perhaps mean.default()

Re: [R] Question on R server and TinnR

2007-08-20 Thread adschai
So if you go to TinnR in R menu on the menu bar and choose 'R server: connections and tests'. What does that do exactly? It seems to me that there's a way to have R listening to incoming request from remote machine from TinnR. If anyone could share your knowledge, I'd really appreciate. Thank

Re: [R] polar.plot orientation and scale in plotrix

2007-08-20 Thread Stephen Tucker
I think that's the standard presentation for polar plots (theta measured from positive x-axis) - that I've seen, anyway. But for customization you can shift your origin for theta and define your own labels. For example, here is a modification to the example in the help page for polar.plot():

Re: [R] R on a flash drive

2007-08-20 Thread Michael Bibo
John Kane jrkrideau at yahoo.ca writes: I usually have R, Tinn-R and portable versions of OpenOoffice.org, and Firefox installed on the USB. Tinn-R works well as a portable editor on a USB flash drive. Likewise, by following the instructions here:

Re: [R] Does anyone.... worth a warning?!? No warning at all

2007-08-20 Thread François Pinard
[Ted Harding] [...] a very important point. [...] There are a lot of idiosyncracies in R, which in time we get used to; but learning about them is something of a sociological exercise, just as one learns that when one's friend A says X Y Z is may not mean the same as when one's friend B

Re: [R] Does anyone.... worth a warning?!? No warning at all

2007-08-20 Thread Mike Meredith
It's always seemed to me that 'mean' behaved as expected, and 'max' et al were peculiar. If you passed 2 or more vectors to a function would you really expect it to concatenate them before doing it's proper job? I'd rather expect it to behave like 'pmax' and compare them element by element.

Re: [R] Any parser generator / code assistance for R?

2007-08-20 Thread Gabor Grothendieck
On 8/17/07, Ali - [EMAIL PROTECTED] wrote: Hi, Is there any parser generator like www.antlr.org? Moreover, how does simple Given the response, it looks like no one has come up with an antlr parser for R but there are some facilities within R itself. showTree() in the R codetools package

[R] Sphericity test in R for repeated measures ANOVA

2007-08-20 Thread Orou Gaoue
Hi, Is there a way to do a sphericity test in R for repeated measures ANOVA (using aov or lme)? I can't find anything about it in the help. Thanks Orou [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list

Re: [R] Sphericity test in R for repeated measures ANOVA

2007-08-20 Thread Simon Blomberg
?mauchly.test also ?anova.mlm Another approach would be to do a direct test of compound symmetry by fitting models with and without that structure, and compare them via a likelihood ratio test. Simon. On Mon, 2007-08-20 at 19:08 -1000, Orou Gaoue wrote: Hi, Is there a way to do a sphericity

Re: [R] Sphericity test in R for repeated measures ANOVA

2007-08-20 Thread Peter Dalgaard
Orou Gaoue wrote: Hi, Is there a way to do a sphericity test in R for repeated measures ANOVA (using aov or lme)? I can't find anything about it in the help. Thanks Orou There is for lm() with multivariate response (mauchly.test). For lme(), you can compare models with a corSymm