Re: [R] plotmath vector problem; full program enclosed

2010-07-07 Thread Paul Johnson
On Tue, Jul 6, 2010 at 12:41 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 06/07/2010 10:54 AM, Paul Johnson wrote: Here's another example of my plotmath whipping boy, the Normal distribution. You want as.expression(b1), not expression(b1).  The latter means the expression

Re: [R] Gray level mosaic plot with shading_Friendly

2010-07-07 Thread Achim Zeileis
On Tue, 6 Jul 2010, Michael Friendly wrote: Michael Kubovy wrote: Suppose we start with data(Titanic) mosaic(Titanic, shade = TRUE) How do I combine the dashed box contours of shading_Friendly to indicate negative residuals, with three levels of gray: dark for abs(Pearson Resid) 4,

[R] R C# (Mono)

2010-07-07 Thread bernde
Hello did anyone ever use C# in connection with R ? i am looking into R extension but would like to use C# instead of C or C++ i wonder whether anyone has experience in particular with Mono for doing so many thanks in advance bernd __

Re: [R] plotmath vector problem; full program enclosed

2010-07-07 Thread Allan Engelhardt
On 07/07/10 06:03, Paul Johnson wrote: [...] Hi, Duncan and David Thanks for looking. I suspect from the comment you did not run the code. The expression examples I give do work fine already. But I have to explicitly put in values like 1.96 to make them work. I'm trying to avid that

Re: [R] grayscale wireframe??

2010-07-07 Thread Allan Engelhardt
A standalone example is always appreciated (cf. the posting guide) but try and see if help(gray.colors, package=grDevices) is the sort of thing you are looking for. Hope this helps Allan On 06/07/10 23:30, Marlin Keith Cox wrote: I need grayscale formatting for a wireframe. The only

Re: [R] plotmath vector problem; full program enclosed

2010-07-07 Thread Allan Engelhardt
Ooops, I didn't convert this one to text right for the list. b1- substitute( mu - d*sigma, list(d=*-round(dividers[1],2))* ) should be b1- substitute( mu - d*sigma, list(d=-round(dividers[1],2)) ) and similarly for labels=*as.expression(c(b1,b2,b3,b4,b5))*, padj=-1) read

Re: [R] ctree ordering nodes

2010-07-07 Thread Achim Zeileis
On Tue, 6 Jul 2010, Paras Sharma wrote: Hello, When using the ctree function, from library (party) what is the syntax to order the Variables in the nodes in a specific way? For example, how would I specify to make a binary come first, then a continuous variable? Not sure what you mean here.

Re: [R] Visualization of coefficients

2010-07-07 Thread Tal Galili
Hello David, Thanks to your posting I started looking at the function in the arm package. It appears this function is quite mature, and offers (for example) the ability to easily overlap coefficients from several models. I updated the post I published on the subject, so at the end of it I give

[R] Wavelet

2010-07-07 Thread nuncio m
Hi useRs, Is it possible to get MORLET wavelet in R Thanks nuncio -- Nuncio.M Research Scientist National Center for Antarctic and Ocean research Head land Sada Vasco da Gamma Goa-403804 [[alternative HTML version deleted]] __

Re: [R] A question about conducting crossed random effects in R

2010-07-07 Thread Paul Chatfield
There is a mixed effects e-mail list you might want to join for more in depth discussion of these topics - you can subscribe here https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models. In general the format for crossed effects would be lmer(y~f1+f2+(1|r1)+(1|r2)) where f1, f2 are fixed

[R] How can I calculate Q-correlations?

2010-07-07 Thread Timo Stolz
I need to calculate Q-correlations, in order to quantify differences between the profiles of my tested persons. Has anybody any experience doing that? Which command/package targets Q-correlations? Timo __ R-help@r-project.org mailing list

Re: [R] Visualization of coefficients

2010-07-07 Thread Allan Engelhardt
Thanks Tal. Nice summary on the web page. I think the last example would be even better if it was a stand-alone piece of code (i.e.: with data) that we could run. For example library(arm) data(Mroz, package = car) M1- glm(lfp ~ ., data = Mroz, family = binomial) M2- bayesglm(lfp ~ .,

Re: [R] Wavelet

2010-07-07 Thread Allan Engelhardt
Try RSiteSearch(MORLET) before you post. Allan On 07/07/10 09:38, nuncio m wrote: Hi useRs, Is it possible to get MORLET wavelet in R Thanks nuncio __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] Visualization of coefficients

2010-07-07 Thread Achim Zeileis
On Wed, 7 Jul 2010, Tal Galili wrote: Hello David, Thanks to your posting I started looking at the function in the arm package.  It appears this function is quite mature, and offers (for example) the ability to easily overlap coefficients from several models. Re: more mature. arm's coefplot()

Re: [R] Wavelet

2010-07-07 Thread stephen sefick
I would even look at the packages page... There are plenty of them. Please, at least, do minimal research before clogging up this list. Also, please read the posting guide that is appended to every mail to this list. On Wed, Jul 7, 2010 at 4:03 AM, Allan Engelhardt all...@cybaea.com wrote: Try

Re: [R] Visualization of coefficients

2010-07-07 Thread Tal Galili
Hi Achim and Allan, I updated the post with Allan's example (thanks Allan). Achim, you wrote: Finally, the Poisson model in comparison with the binomial models does not make much sense, I guess. I agree. I wanted something to showcase the function on 3 models (with the same predictors), and

Re: [R] Visualization of coefficients

2010-07-07 Thread Achim Zeileis
On Wed, 7 Jul 2010, Tal Galili wrote: Hi Achim and Allan,I updated the post with Allan's example (thanks Allan). Thanks! Achim, you wrote: Finally, the Poisson model in comparison with the binomial models does not make much sense, I guess. I agree.  I wanted something to showcase the

Re: [R] Visualization of coefficients

2010-07-07 Thread Tal Galili
I Achim, I retained the example (so to illustrate the use of the function) - but pointed out to it's nonsensical nature. Credit was mentioned to both you and Allan. Thanks, Tal Contact Details:--- Contact me:

Re: [R] plotmath vector problem; full program enclosed

2010-07-07 Thread Duncan Murdoch
On 07/07/2010 1:03 AM, Paul Johnson wrote: On Tue, Jul 6, 2010 at 12:41 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 06/07/2010 10:54 AM, Paul Johnson wrote: Here's another example of my plotmath whipping boy, the Normal distribution. You want as.expression(b1), not

[R] sqlQuery not functioning properly

2010-07-07 Thread Simon . Gingins
Hello, I am using Rcommander to generate codes and when I go through it to load my excel file, it works. But every time I re-open my script and try to load it directly with the script Rcommander generated, I get an error message. Basically the code works one time and then no more. Here's the

Re: [R] Break in the y-axis

2010-07-07 Thread Jim Lemon
On 07/07/2010 02:39 AM, beloitstudent wrote: Thanks for the advice! It has worked for the most part. However, I am still coming up with an error message when placing my break line in the axis that I'm not sure what it means. If you could help me out, that would be fantastic...otherwise I

Re: [R] Help With ANOVA (corrected please ignore last email)

2010-07-07 Thread Dennis Murphy
Hi: I'd suggest looking at the following plot (data in original post, copied below): library(lattice) stripplot(Intensity ~ Group, data = zzzanova) Some things stand out in this plot that merit attention. As Josh Wiley pointed out in an earlier reply, the concentration of -4.60517 values in

Re: [R] grouped logit regression

2010-07-07 Thread Corey Sparks
by grouped data are you saying that you have counts of outcomes and counts of trials? That is how I interpret the glogit in stata. If that is the case you can put your data into glm() like this fit-glm(nevents~xvars, weights=ntrials, family=binomial, data=yourdataset) will fit the binomial

[R] how to download files from ftp site

2010-07-07 Thread Benoit Wastine
Hi all, I'm running R 2.10.1 on Windows XP and I'd like to read files from a ftp site. Does anybody know how to do ? Thanks Benoit -- Benoit Wastine Laboratoire des Sciences du Climat et de l’Environnement (LSCE/IPSL) CEA-CNRS-UVSQ CE Saclay Orme des merisiers Bât 703 - Pte 13A 91191 Gif sur

[R] Odp: identifying odd or even number

2010-07-07 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 01.07.2010 17:40:22: Hi, I run into problem when writing a syntax, I don't know syntax that will return true or false if an integer is odd or even. fff - function(x) as.logical(x%%2) Regards Petr Thanks OYEYEMI, Gafar Matanmi Department

Re: [R] numerical derivative R help

2010-07-07 Thread Setlhare Lekgatlhamang
Which package are you using? -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Parminder Mankoo Sent: Tuesday, July 06, 2010 10:50 PM To: r-help@r-project.org Subject: [R] numerical derivative R help Importance: Low I fit my CDF to

[R] Need help in handling date

2010-07-07 Thread Christofer Bogaso
Dear all, I have a date related question. Suppose I have a character string March-2009, how I can convert it to a valid date object like as.yearmon(2009-01-03) in the zoo package? Is there any possibility there? Ans secondly is there any R function which will give the names of of all months as

Re: [R] Need help in handling date

2010-07-07 Thread Whit Armstrong
?strptime ‘%B’ Full month name in the current locale. (Also matches abbreviated name on input.) On Wed, Jul 7, 2010 at 8:40 AM, Christofer Bogaso bogaso.christo...@gmail.com wrote: Dear all, I have a date related question. Suppose I have a character string March-2009, how I can

Re: [R] Need help in handling date

2010-07-07 Thread Marc Schwartz
On Jul 7, 2010, at 7:40 AM, Christofer Bogaso wrote: Dear all, I have a date related question. Suppose I have a character string March-2009, how I can convert it to a valid date object like as.yearmon(2009-01-03) in the zoo package? Is there any possibility there? Ans secondly is there any

Re: [R] how to download files from ftp site

2010-07-07 Thread Uwe Ligges
?download.file Uwe Ligges On 07.07.2010 14:05, Benoit Wastine wrote: Hi all, I'm running R 2.10.1 on Windows XP and I'd like to read files from a ftp site. Does anybody know how to do ? Thanks Benoit __ R-help@r-project.org mailing list

Re: [R] Need help in handling date

2010-07-07 Thread Gabor Grothendieck
On Wed, Jul 7, 2010 at 8:40 AM, Christofer Bogaso bogaso.christo...@gmail.com wrote: Dear all, I have a date related question. Suppose I have a character string March-2009, how I can convert it to a valid date object like as.yearmon(2009-01-03) in the zoo package? Is there any possibility

[R] can't open file

2010-07-07 Thread Sebastian Kruk
I have a text file log2.log encoded Ansi in Windows. When I execute: out - read.zoo(readLines(con - file(log2.log, encoding=UCS-2LE)),FUN = as.chron) have errors: Error en file(file, rt) : no se puede abrir la conexión Además: Mensajes de aviso perdidos 1: In file(file, rt) : sólo fue usado

[R] Loading text file from data folder of package

2010-07-07 Thread Andrew Liu
Hello, I am creating a package and in my vignette I would like to load a text file from the data folder of the package. Currently, I am doing the following: filepath - paste(.libPaths(), pkgname, data, sample.txt, sep = /) file(filepath) Is there a better way of doing this? Thanks, Andrew

[R] Trimming in R

2010-07-07 Thread Andrew Leeser
I am looking for a way to trim leading and trailing spaces in a character string in R. For example:    this is random text    should become: this is random text. I have a short function to perform this task as follows: trim - function(str){    str - sub(^ +, , str)    str -

Re: [R] Trimming in R

2010-07-07 Thread Henrique Dallazuanna
Try this: gsub(^\\s+|\\s+$, ,this is random text) On Wed, Jul 7, 2010 at 10:23 AM, Andrew Leeser aml05willi...@yahoo.comwrote: I am looking for a way to trim leading and trailing spaces in a character string in R. For example: this is random text should

Re: [R] Loading text file from data folder of package

2010-07-07 Thread Henrique Dallazuanna
See ?system.file On Wed, Jul 7, 2010 at 10:20 AM, Andrew Liu andrew.t@williams.eduwrote: Hello, I am creating a package and in my vignette I would like to load a text file from the data folder of the package. Currently, I am doing the following: filepath - paste(.libPaths(), pkgname,

Re: [R] can't open file

2010-07-07 Thread Henrique Dallazuanna
You've tried this? out - read.zoo(log2.log, encoding=UCS-2LE, FUN = as.chron) On Wed, Jul 7, 2010 at 10:16 AM, Sebastian Kruk residuo.so...@gmail.comwrote: I have a text file log2.log encoded Ansi in Windows. When I execute: out - read.zoo(readLines(con - file(log2.log,

Re: [R] can't open file

2010-07-07 Thread Gabor Grothendieck
On Wed, Jul 7, 2010 at 9:16 AM, Sebastian Kruk residuo.so...@gmail.com wrote: I have a text file log2.log encoded Ansi in Windows. When I execute: out - read.zoo(readLines(con - file(log2.log, encoding=UCS-2LE)),FUN = as.chron) have errors: Error en file(file, rt) : no se puede abrir la

Re: [R] can't open file

2010-07-07 Thread Sebastian Kruk
If I edit(out): structure(logical(0), .Dim = c(707L, 0L), .Dimnames = list(NULL, NULL), index = structure(1:707, format = m/d/y, origin = structure(c(1, 1, 1970), .Names = c(month, day, year)), class = c(dates, times)), class = zoo) I tried: z - read.zoo(textConnection(L), index = 1:2,FUN =

Re: [R] Trimming in R

2010-07-07 Thread David Winsemius
On Jul 7, 2010, at 9:23 AM, Andrew Leeser wrote: I am looking for a way to trim leading and trailing spaces in a character string in R. For example: this is random text should become: this is random text. I have a short function to perform this task as follows: trim -

Re: [R] can't open file

2010-07-07 Thread Sebastian Kruk
I tried: L - readLines(con - file(log2.log, encoding=UCS-2LE) z - read.zoo(textConnection(L), index = 1:2,FUN = function(x) paste(x[,1], x[,2])) Error: Error en x[, 1] : número incorreto de dimensiones __ R-help@r-project.org mailing list

Re: [R] can't open file

2010-07-07 Thread Gabor Grothendieck
On Wed, Jul 7, 2010 at 9:43 AM, Sebastian Kruk residuo.so...@gmail.com wrote: I tried: L - readLines(con - file(log2.log, encoding=UCS-2LE) z - read.zoo(textConnection(L), index = 1:2,FUN = function(x) paste(x[,1], x[,2])) Error: Error en x[, 1] : número incorreto de dimensiones Please

Re: [R] can't open file

2010-07-07 Thread Duncan Murdoch
On 07/07/2010 9:16 AM, Sebastian Kruk wrote: I have a text file log2.log encoded Ansi in Windows. What Windows calls Ansi is called latin1 in R. You said the encoding was UCS-2LE, which Windows calls Unicode. Part of your problem might be this mismatched encoding. Have you tried using

[R] error in step.gam

2010-07-07 Thread Kim Vanselow
Dear r-helpers, I use function step.gam (package gam, T. Hastie) with several explanatory variables to build a model. Unfortunately, I obviously have too many variables. This message occurs on my 4 core 64bit machine with 8GB RAM in R2.11.1 for Windows (64bit build): Error in array(FALSE,

Re: [R] Visualization of coefficients

2010-07-07 Thread Michael Friendly
Tal Galili wrote: Hello David, Thanks to your posting I started looking at the function in the arm package. It appears this function is quite mature, and offers (for example) the ability to easily overlap coefficients from several models. I updated the post I published on the subject, so at

[R] relation in aggregated data

2010-07-07 Thread Petr PIKAL
Dear all My question is more on statistics than on R, however it can be demonstrated by R. It is about pros and cons trying to find a relationship by aggregated data. I can have two variables which can be related and I measure them regularly during some time (let say a year) but I can not

Re: [R] Visualization of coefficients

2010-07-07 Thread Tal Galili
Thanks Michael - I now inserted the correct image for Achim example code. Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |

[R] help with Date class

2010-07-07 Thread Elisenda Vila
I am trying to work with the Date class which is written in S3 and I would like to access to the elements of the class (for example the year). I've tryed to do it for example like this: as.Date(Sys.time)-w w$year #Doesn't work w[year] #is NA I would like to know the correct way to acces to this

[R] Different goodness of fit tests leads to contradictory conclusions

2010-07-07 Thread Kiyoshi Sasaki
I am trying to test goodness of fit for my legalistic regression using several options as shown below.  Hosmer-Lemeshow test (whose function I borrowed from a previous post), Hosmer–le Cessie omnibus lack of fit test (also borrowed from a previous post), Pearson chi-square test, and deviance

Re: [R] can't open file

2010-07-07 Thread Sebastian Kruk
In both cases I obtain: 01/02/70 01/03/70 01/04/70 01/05/70 01/06/70 01/07/70 01/08/70 01/09/70 01/10/70 01/11/70 01/12/70 01/13/70 01/14/70 01/15/70 01/16/70 01/17/70 01/18/70 01/19/70 01/20/70 01/21/70 01/22/70 01/23/70 01/24/70 01/25/70 01/26/70 01/27/70 01/28/70 01/29/70 01/30/70 01/31/70

Re: [R] help with Date class

2010-07-07 Thread David Winsemius
On Jul 7, 2010, at 7:25 AM, Elisenda Vila wrote: I am trying to work with the Date class which is written in S3 and I would like to access to the elements of the class (for example the year). I've tryed to do it for example like this: as.Date(Sys.time)-w Throws an error ... since

Re: [R] xyplot: key inside the plot region / lme: confidence bands for predicted

2010-07-07 Thread Michael Friendly
No one replied to my second question: how to get standard errors or confidence intervals for the estimated fixed effects from lme().AFAICS, intervals() only gives CIs for coefficients. My working example is: library(nlme) library(lattice) Ortho - Orthodont Ortho$year - Ortho$age - 8 #

Re: [R] help with Date class

2010-07-07 Thread Dirk Eddelbuettel
On Wed, Jul 07, 2010 at 01:25:43PM +0200, Elisenda Vila wrote: I am trying to work with the Date class which is written in S3 and I would like to access to the elements of the class (for example the year). I've tryed to do it for example like this: as.Date(Sys.time)-w w - Sys.Date() #

Re: [R] Different goodness of fit tests leads to contradictory conclusions

2010-07-07 Thread Joris Meys
The first two options are GOF-tests for ungrouped data, the latter two can only be used for grouped data. According to my experience, the G^2 test is more influenced by this than the X^2 test (gives -wrongly- significant deviations more easily when used for ungrouped data). If you started from

Re: [R] Gray level mosaic plot with shading_Friendly

2010-07-07 Thread Michael Kubovy
Dear Achim and Michael, Thank you so much. Indeed, mosaic(Titanic, gp = shading_hcl, gp_args = list(lty = 1:2, c = 0)) does almost what I was looking for, except that for consistency and clarity, I would have expected the negative values on the legend to be be outlined with lty = 2. Michael

[R] interaction post hoc/ lme repeated measures

2010-07-07 Thread Doug Bourne
Hi Everyone, I’m trying to figure out how to get R to analyze this experiment properly. I have a series of subjects each with two legs. Within each leg there are two bones that I am interested in. There are also two treatments that I am interested in. That results in four different

Re: [R] how to display the clock time in the loop

2010-07-07 Thread Jack Luo
Thanks a bunch, it works. On Thu, Jul 1, 2010 at 4:50 PM, Nikhil Kaza nikhil.l...@gmail.com wrote: explicit call to print usually works for me. library(audio) for (i in 1:5){ wait(60) print(Sys.time()) } On Jul 1, 2010, at 4:30 PM, Matt Shotwell wrote: Try to flush output after

[R] F# vs. R

2010-07-07 Thread Sergey Goriatchev
Hello, everyone F# is now public. Compiled code should run  faster than R. Anyone has opinion on F# vs. R? Just curious Best, S -- --- Kniven skärpes bara mot stenen. __ R-help@r-project.org mailing list

Re: [R] relation in aggregated data

2010-07-07 Thread Joris Meys
You examples are pretty extreme... Combining 120 data points in 4 points is off course never going to give a result. Try : fac - rep(1:8,each=15) xprum - tapply(x, fac, mean) yprum - tapply(y, fac, mean) plot(xprum, yprum) Relation is not obvious, but visible. Yes, you lose information. Yes,

[R] Sum vectors and numbers

2010-07-07 Thread guox
We want to sum many vectors and numbers together as a vector if there is at least one vector in the arguments. For example, 1 + c(2,3) = c(3,4). Since we are not sure arguments to sum, we are using sum function: sum(v1,v2,...,n1,n2,..). The problem is that sum returns the sum of all the values

Re: [R] Sum vectors and numbers

2010-07-07 Thread Erik Iverson
g...@ucalgary.ca wrote: We want to sum many vectors and numbers together as a vector if there is at least one vector in the arguments. For example, 1 + c(2,3) = c(3,4). Since we are not sure arguments to sum, we are using sum function: sum(v1,v2,...,n1,n2,..). The problem is that sum returns

Re: [R] Sum vectors and numbers

2010-07-07 Thread Gabor Grothendieck
On Wed, Jul 7, 2010 at 11:35 AM, g...@ucalgary.ca wrote: We want to sum many vectors and numbers together as a vector if there is at least one vector in the arguments. For example, 1 + c(2,3) = c(3,4). Since we are not sure arguments to sum, we are using sum function:

Re: [R] F# vs. R

2010-07-07 Thread Marc Schwartz
On Jul 7, 2010, at 10:31 AM, Sergey Goriatchev wrote: Hello, everyone F# is now public. Compiled code should run faster than R. Anyone has opinion on F# vs. R? Just curious Best, S The key time critical parts of R are written in compiled C and FORTRAN. Of course, if you want to

[R] Appropriateness of survdiff {survival} for non-censored data

2010-07-07 Thread Frostygoat
I read through Harrington and Fleming (1982) but it is beyond my statistical comprehension. I have survival data for insects that have a very finite expiration date. I'm trying to test for differences in survival distributions between different groups. I understand that the medical field is

Re: [R] Trimming in R

2010-07-07 Thread Ken Takagi
David Winsemius dwinsemius at comcast.net writes: On Jul 7, 2010, at 9:23 AM, Andrew Leeser wrote: I am looking for a way to trim leading and trailing spaces in a character string in R. For example: this is random text should become: this is random text.

Re: [R] Different goodness of fit tests leads to contradictory conclusions

2010-07-07 Thread Kiyoshi Sasaki
Dear Joris,   Thank you for your prompt reply! I have a binary dependent variable (whether a snake is pregnant or not pregnant). Independent/predictor variable is the snake's body size. Each observation (row) of the data represents each snake. One column of the data contain '0' or '1' to

Re: [R] grayscale wireframe??

2010-07-07 Thread Sebastien Guyader
With grDevices package, I do the following to generate a greyscale: newcols - colorRampPalette(c(white, black)) #generates palette from white to black #OR newcols - colorRampPalette(c(grey90, grey10)) #generates palette frome light to dark grey for better visibility Then in the wireframe()

Re: [R] how to define a function in R

2010-07-07 Thread Peter Ehlers
Chapter 10 of 'An Introduction to R' has the suggestive title Writing your own functions. Isn't that the *first* place you would look? -Peter Ehlers On 2010-07-06 20:57, jd6688 wrote: Thanks Joshua for the example which has been great help me to start. Wish you the best Jason Ding On

Re: [R] Adding two files into one and vlookup

2010-07-07 Thread raghu
I dont get any putput by merging. merge(file1,file2) [1] Date Price 0 rows (or 0-length row.names) file3-merge(file1,file2,by.file1='Date') file3 [1] Date Price 0 rows (or 0-length row.names) The above are the results. Nothing is coming in file3. On 7/7/10, Peter Alspach-2 [via R]

Re: [R] Adding two files into one and vlookup

2010-07-07 Thread Raghu
I was able to achieve the desired output. The issue I had was that both the files contained the Date column in the data format. So, i first converted this colum alone into numeric and then did a merge on the files and it worked. The moral is that in any dataframe all variable have to be of similar

Re: [R] Adding two files into one and vlookup

2010-07-07 Thread raghu
I tried and this error popped: z1 - read.zoo(textConnection(Lines1), header = TRUE, format = fmt) Error in textConnection(Lines1) : invalid 'text' argument Also library(chron) returns error as it is an invalid library. Could you help? On 7/7/10, Gabor Grothendieck [via R]

Re: [R] Adding two files into one and vlookup

2010-07-07 Thread Raghu
Say I have two files file and file2: file1 contains the following: DatePrice 02/07/2010 53.96597903 03/07/2010 56.92825807 04/07/2010 39.27408645 05/07/2010 42.59834151 06/07/2010 70.68512383 07/07/2010 10.92505265 08/07/2010 52.12492249

Re: [R] Gray level mosaic plot with shading_Friendly

2010-07-07 Thread Achim Zeileis
On Wed, 7 Jul 2010, Michael Kubovy wrote: Dear Achim and Michael, Thank you so much. Indeed, mosaic(Titanic, gp = shading_hcl, gp_args = list(lty = 1:2, c = 0)) does almost what I was looking for, except that for consistency and clarity, I would have expected the negative values on the

[R] use sliding window to count substrings found in large string

2010-07-07 Thread Immanuel
Hello together, I'm looking for advice on how to do some tests on strings. What I want to do is the following: (just an example, real strings/sequence are about 200-400 characters long) given set of Strings: String1 abcdefgh String2 bcdefgop use a sliding window of size x to create an vector

[R] HELP - four.nines.cartesian.probability.grid

2010-07-07 Thread Charles Annis, P.E.
My routine (below) works OK but misbehaves if the on-screen plot is made wider using the mouse. The problem is caused by using par(usr)[1] - 0.07 * (par(usr)[2] - par(usr)[1]) to locate two items on the y-axis. The rest of the labeling is controlled by the line=0 parameter setting.

Re: [R] Calculate area under a curve

2010-07-07 Thread Greg Snow
The mean values theorem of integration (which I think typifies the differences in thinking between mathematicians and statisticians) says that the integral from a to b is equal to the average value of the curve between a and b times the distance from a to b (b - a). I would be interested in

Re: [R] Visualization of coefficients

2010-07-07 Thread David Winsemius
On Jul 7, 2010, at 10:19 AM, Michael Friendly wrote: Tal Galili wrote: Hello David, Thanks to your posting I started looking at the function in the arm package. It appears this function is quite mature, and offers (for example) the ability to easily overlap coefficients from several

Re: [R] use sliding window to count substrings found in large string

2010-07-07 Thread Gabor Grothendieck
On Wed, Jul 7, 2010 at 12:25 PM, Immanuel mane.d...@googlemail.com wrote: Hello together, I'm looking for advice on how to do some tests on strings. What I want to do is the following: (just an example, real strings/sequence are about 200-400 characters long) given set of Strings:

Re: [R] F# vs. R

2010-07-07 Thread Sergey Goriatchev
Hello, Marc No, I do not want to validate Cox PH. :-) I do use R daily, though right now I do not use the statistical part that much. I just generally wonder if any R-user tried F# and his/her opinions. Regards, Sergey On Wed, Jul 7, 2010 at 17:56, Marc Schwartz marc_schwa...@me.com wrote:

Re: [R] nls + quasi-poisson distribution

2010-07-07 Thread Heather Turner
Dear Suresh, The gnm package for generalized nonlinear models might be what you want here. This allows you to specify nonlinear models with family=quasipoisson. For an introduction to the package see the article in R News: http://cran.r-project.org/doc/Rnews/Rnews_2007-2.pdf If your model

Re: [R] possible to plot number line in R?

2010-07-07 Thread Greg Snow
Here is some code to get you started: plot.new() plot.window( c(0,10), c(-1, 1) ) axis(1, at=0:10, pos=0) lines( c(2,2,5,5), c( -0.25, -0.5, -0.5, -0.25 ) ) text( 3, -0.6, 'Interval 1' ) # the plotrix package has a function for text in a box lines( c(3,3,6,6), c( 0.1, 0.3, 0.3, 0.1) ) text(

Re: [R] use sliding window to count substrings found in large string

2010-07-07 Thread Immanuel
Hey, big help, thanks! One little question remains, if I create more then one string and table ... - # generate an input string n long set.seed(123) n - 300 lets_1 - paste(sample(letters[1:5], n, replace = TRUE), collapse = ) lets_2 - paste(sample(letters[1:5], n, replace =

Re: [R] help on bar chart

2010-07-07 Thread Greg Snow
fortune(197) If anything, there should be a Law: Thou Shalt Not Even Think Of Producing A Graph That Looks Like Anything From A Spreadsheet. -- Ted Harding (in a discussion about producing graphics) R-help (August 2007) Filling graphics objects with lines dates back to the days when

Re: [R] use sliding window to count substrings found in large string

2010-07-07 Thread Gabor Grothendieck
On Wed, Jul 7, 2010 at 1:15 PM, Immanuel mane.d...@googlemail.com wrote: Hey, big help, thanks! One little question remains, if I create more then one string and table ... - # generate an input string n long set.seed(123) n - 300 lets_1 - paste(sample(letters[1:5],

Re: [R] use sliding window to count substrings found in large string

2010-07-07 Thread Gabor Grothendieck
On Wed, Jul 7, 2010 at 1:25 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: On Wed, Jul 7, 2010 at 1:15 PM, Immanuel mane.d...@googlemail.com wrote: Hey, big help, thanks! One little question remains, if I create more then one string and table ... - # generate an

Re: [R] using objects from different workspaces

2010-07-07 Thread Greg Snow
Check out the high performance computing task view on CRAN. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of

Re: [R] F# vs. R

2010-07-07 Thread Bernardo Rangel Tura
On Wed, 2010-07-07 at 17:31 +0200, Sergey Goriatchev wrote: Hello, everyone F# is now public. Compiled code should run faster than R. Anyone has opinion on F# vs. R? Just curious Best, S Sergey, F# is public, but is not open source. F# run in windows but run in AIX, linux, MAC,

Re: [R] Data Labels in a barchart (Lattice or otherwise)

2010-07-07 Thread Greg Snow
fortune(197) If anything, there should be a Law: Thou Shalt Not Even Think Of Producing A Graph That Looks Like Anything From A Spreadsheet. -- Ted Harding (in a discussion about producing graphics) R-help (August 2007) Also read the discussion started with:

Re: [R] use sliding window to count substrings found in large string

2010-07-07 Thread Immanuel
Hey, saved my day. Now can watch the football semi-final thanks Turn them into factors with the appropriate levels before counting them with table: # generate an input string n long set.seed(123) n - 300 lets_1 - paste(sample(letters[1:5], n, replace = TRUE), collapse = ) lets_2 -

[R] subscripts for panel.superpose in lattice

2010-07-07 Thread László Sándor
Hi, I am trying to superimpose (overlay) regression lines to scatter plots by groups with xyplot (dysfunctional code below). However, my call of panel.superpose breaks down because of the subscripts requirement. I tried to research the documentation and examples, but I cannot figure out how to

Re: [R] export VTK from R : impossible to write data as float

2010-07-07 Thread yepri
So, the problem was that R exports only double sized floats (double), and Paraview requires single sized floats. The solution was just to write : writeBin(data,bfile_celldata,endian=swap,size=4) Special Thanks to Sebastian Gibb : http://www.mail-archive.com/r-help@r-project.org/msg100994.html

[R] [R-pkgs] ggplot2 version 0.8.8

2010-07-07 Thread Hadley Wickham
ggplot2 ggplot2 is a plotting system for R, based on the grammar of graphics, which tries to take the good parts of base and lattice graphics and avoid bad parts. It takes care of many of the fiddly details that make plotting a hassle

Re: [R] how to draw the legend about color from 3d picture

2010-07-07 Thread Sebastien Guyader
It may not help the original poster, but here's a solution based on what Greg said above: # Load plotrix library(plotrix) # Create a new layout to divide the graphics in 2, the first one (displaying the persp() graph) being 4 times larger than the second one (displying the legend)

Re: [R] plotmath vector problem; full program enclosed

2010-07-07 Thread Paul Johnson
On Wed, Jul 7, 2010 at 5:41 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote: You want as.expression(b1), not expression(b1).  The latter means the expression consisting of the symbol b1.  The former means take the object stored in b1, and convert it to an expression.. Thanks to Duncan

[R] LondonR July Meeting

2010-07-07 Thread Sarah Lewis
I am pleased to announce to agenda for next weeks LondonR meeting: LondonR meeting - 13th July 2010 Date:   Tuesday 13th July 2010 Time:    6pm - 9pm Venue:  The Shooting Star     125 - 129 Middlesex Street     E1 7JF    

[R] Weired problem when passing arguments using ...?

2010-07-07 Thread thmsfuller...@gmail.com
Hello All, I'm trying to pass the argument col.names to write.csv using '...'. But I got the following warnings. Maybe it is very simple. But I'm not sure what I am wrong. Could you please help point to me what the problem is? # fun=function(x, ...) { fr=parent.frame()

[R] how to process this in R

2010-07-07 Thread jd6688
Here are what i am going to accomplish: I have 400 files named as xxx.txt. the content of the file looks like the following: namecount 1. aaa 100 2. bbb2000 3. ccc300 4. ddd 3000 more that 1000 rows in each files. these are the areas i need help: 1.

[R] Batch files process and String parsing

2010-07-07 Thread jd6688
Here are what i am going to accomplish: I have 400 files named as xxx.txt. the content of the file looks like the following: namecount 1. aaa 100 2. bbb2000 3. ccc300 4. ddd 3000 more that 1000 rows in each files. these are the areas i need help: 1. how can i

[R] forcing a zero level in contr.sum

2010-07-07 Thread Bond, Stephen
I need to use contr.sum and observe that some levels are not statistically different from the overall mean of zero. What is the proper way of forcing the zero estimate? It seems the column corresponding to that level should become a column of zeros. Is there a way to achieve that without me

[R] xyplot of function only shows diagonal plots

2010-07-07 Thread DrHatch
I expected this script to show nine panels, each with a plot of the function. But when I run it, only the diagonal panels have content. Executing print(trel_1) shows what I expected in the upper left corner. I am using R ver. 2.11.0 and lattice ver. 0.18-8 on Windows XP under Eclipse and

  1   2   >