[R] Underline only colnames in grid.table

2010-10-29 Thread robbert blonk
Dear all, I would like to underline only the colnames in a table as e.g. grid.draw(tableGrob(head(iris, 10), name=test)) I can imagine you should use grid.edit or so, bu I can't figure out how... Does anyone have a suggestion? Thanks Robbert windows xp R 2.10.1 -- View this message in

Re: [R] Please help me about Monte Carlo Permutation

2010-10-29 Thread Łukasz Ręcławowicz
2010/10/29 Chitra cbban...@gmail.com £ukasz Rêc³awowicz, Thanks. I got this p-value. It's exact upper tail (=), for lower you have to add ((-test.statistic)) to obtain two-sided p-vaule. test() [1] P-value: 0.00139 I still could not figure out how to plot 5000 permuted Qtot vs Itot.

Re: [R] Dickey Fuller Test

2010-10-29 Thread Pfaff, Bernhard Dr.
Dear Cuckovic, although you got already an answer to your post that relates a little bit more on the time series characteristics of your data in question; I will take up on your initial question. Basically, you got trapped by the word 'time series' in the documentation for adf.test(). What is

[R] quiry on paste() function

2010-10-29 Thread Ron Michael
Hi all, I want to club different objects (character type) to a single one and using paste() function that can be done happily. However the problem with paste function is the separator field is unique for all underlying objects. If I put separator as - then this will come in between all

Re: [R] Changing origin of line in radial plot

2010-10-29 Thread Jim Lemon
On 10/28/2010 10:38 PM, Gonzalo Garcia-Perate wrote: Jim, thanks for your reply, it works! but the results are not what I expected. What the code does now is completely reverse the central chart area, so what was coloured before now is white, see here http://www.flickr.com/photos/gonzillaaa/

Re: [R] quiry on paste() function

2010-10-29 Thread Ivan Calandra
Hi, It would be interesting to have such behavior, but I think you would then need to specify every separator, for example like this: paste(a, b, c, sep=c(,, ,, :)) Otherwise, R cannot know where to put each separator. So at the end, it's not much different from several paste() calls, isn't

Re: [R] Clustering

2010-10-29 Thread dpender
That's helpful but the reason I'm using clusters in evd is that I need to specify a time condition to ensure independence. I therefore have an output in the form Cluster[[i]][j-k] where i is the cluster number and j-k is the range of values above the threshold taking account of the time

[R] check RAM usage

2010-10-29 Thread Joel
Hi Is there any way to check an certain command or procedure's RAM usage? Im after something similar to system.time(bla) that gives me the time the command took to preform but for RAM usage. Hope you understand what i mean. Best regards Joel -- View this message in context:

[R] what´s wrong with this code?

2010-10-29 Thread José Manuel Gavilán Ruiz
Hello, I want to maximize a likelihood function expressed as an integral that can not be symbolically evaluated. I expose my problem in a reduced form. g- function(x){ integrand-function(y) {exp(-x^2)*y} g-integrate(integrand,0,1) } h-function(x) log((g(x))) g

Re: [R] Rsolnp examples

2010-10-29 Thread Hans W Borchers
Jan Theodore Galkowski bayesianlogic at acm.org writes: I'm interested in the Rsolnp package. For their primary function solnp, one example is given, and there is a reference to unit tests. Anyone know where these can be found? Also, Rsolnp is used in a few other packages (e.g.,

Re: [R] what´s wrong with this code?

2010-10-29 Thread Berwin A Turlach
G'day Jose, On Fri, 29 Oct 2010 11:25:05 +0200 José Manuel Gavilán Ruiz g...@us.es wrote: Hello, I want to maximize a likelihood function expressed as an integral that can not be symbolically evaluated. I expose my problem in a reduced form. g- function(x){ integrand-function(y)

Re: [R] R and Matlab

2010-10-29 Thread Claudia Beleites
Dear Henrik, sorry for bothering you with a report hastily pasted together and not particularly nice for you as I used my toy data flu from a non-standard package. I should have better used e.g. the iris. I'm aware that writeMat doesn't deal with S4 objects. In fact, if I'd overlook the

Re: [R] what´s wrong with this code?

2010-10-29 Thread Berwin A Turlach
G'day Jose, On Fri, 29 Oct 2010 11:25:05 +0200 José Manuel Gavilán Ruiz g...@us.es wrote: Hello, I want to maximize a likelihood function expressed as an integral that can not be symbolically evaluated. I expose my problem in a reduced form. g- function(x){ integrand-function(y)

[R] strftime vs strptime ??

2010-10-29 Thread skan
Hello Could anyone explain me the difference between strftime vs strptime, please ? I've read the help but it's a little bit cionfusing for me. cheers -- View this message in context: http://r.789695.n4.nabble.com/strftime-vs-strptime-tp3018865p3018865.html Sent from the R help mailing list

[R] multiple weights in MANOVA

2010-10-29 Thread Michael Hopkins
Hi all I have 7 responses that I want to fit with MANOVA. I have accumulated the responses into a matrix Y and each response has a weight vector associated with it, so I have accumulated the weights into a matrix WT of the same dimensions as Y. When I try fit - manova( Y ~ X1 + X2

[R] Checking existance of a directory

2010-10-29 Thread Ron Michael
Hi all, I am wondering is there any way to check whether some Directory exists or not, given the parent path of that directory? After searching for a while I found that there is a function dir.create() to create some directory. However I need to know whether such directory already exists or

[R] true time series lags behind fitted values in arima model

2010-10-29 Thread Benedikt Gehr
Hi I am fitting an arima model to some time series X. When I was comparing the fitted values of the model to the true time series I realized that the true time series lags one time step behind the fitted values of the arima model. And this is the case for any model. When I did a simple

Re: [R] quiry on paste() function

2010-10-29 Thread Jan van der Laan
Perhaps the following construct does what you need: paste(c(a, b, c), c(,, :, ), sep=,collapse=) Regards, Jan On 29-10-2010 10:49, Ron Michael wrote: Hi all, I want to club different objects (character type) to a single one and using paste() function that can be done happily. However the

Re: [R] Checking existance of a directory

2010-10-29 Thread Andris Jankevics
Hi, something like this perhaps, if(myfolder%in%dir()==FALSE) dir.create(myfolder) Command dir.create() is not overwriting an existing folder. Best regards, Andris On Fri, Oct 29, 2010 at 12:08 PM, Ron Michael ron_michae...@yahoo.com wrote: Hi all, I am wondering is there any way to check

Re: [R] Checking existance of a directory

2010-10-29 Thread Henrique Dallazuanna
Try this: if(!file.info('myfolder')$isdir) dir.create('myfolder') On Fri, Oct 29, 2010 at 9:08 AM, Ron Michael ron_michae...@yahoo.comwrote: Hi all, I am wondering is there any way to check whether some Directory exists or not, given the parent path of that directory? After searching for a

Re: [R] Checking existance of a directory

2010-10-29 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 29/10/10 13:08, Ron Michael wrote: Hi all, I am wondering is there any way to check whether some Directory exists or not, given the parent path of that directory? After searching for a while I found that there is a function dir.create() to

Re: [R] quiry on paste() function

2010-10-29 Thread Gabor Grothendieck
On Fri, Oct 29, 2010 at 4:49 AM, Ron Michael ron_michae...@yahoo.com wrote: Hi all, I want to club different objects (character type) to a single one and using paste() function that can be done happily. However the problem with paste function is the separator field is unique for all

Re: [R] check RAM usage

2010-10-29 Thread jim holtman
?memory.size use before/after a sequence of commands to get an idea of the memory usage. On Fri, Oct 29, 2010 at 5:21 AM, Joel joda2...@student.uu.se wrote: Hi Is there any way to check an certain command or procedure's RAM usage? Im after something similar to system.time(bla) that gives

[R] make many barplot into one plot

2010-10-29 Thread Sibylle Stöckli
Dear R users I would like to group my barplot graph (see example on the R help link). The proposed R code, adding individual bars to the plot, looks really overwhelming. My specific dataset just consists of five groups and three different levels within each groups (the individual bars). The

Re: [R] relsurv package

2010-10-29 Thread Laurence Lauvier
Hello, I have a question about relsurv package particularly rsadd function: Rsadd(Surv(time,cens)~sex+ratetable(age=age*365.24,sex=sex,year=year),data=,=ratetable=,int=5,method=”max.lik”). In the tutorial, it is indicated that the age and year must be given in the date format, i.e. in number of

[R] Simulating data, loop

2010-10-29 Thread Sarah
Hello, I would like to run a script in which a loop is included. Since I'm new to R, I cannot manage the following problem. I really hope someone could help me out. Data in the variable Y should be removed from the simulated data set with probability 0.50 if the variable X has a value below

[R] help pages do not open

2010-10-29 Thread Dimitri Liakhovitski
I have just installed R 12. I have Windows 7, 64-bit verison. I currently have IE as my default browser. The internet connection is very good. Whenever I try to run a help command (?lm, for example), I get this error: Error in shell.exec(url) : access to

[R] Printing data.frame data: alternatives to print?

2010-10-29 Thread Matthew Pettis
Hi, I have a data frame with two factors (well, more, but 2 for simple consideration), and I want to display the different combinations of the them that actually occur in the data. In reality, there are too many of them to do to do a 'table' call and have one col vertical and one col horizontal

Re: [R] Simulating data, loop

2010-10-29 Thread Ivan Calandra
Hi Sarah, There is one thing you need to think about: how do you choose which values should not be removed if you have more than 20 and which should be if you have less than 20. In my code, I've just done it with sample(), which might not be what you need. Here is what I have: if

Re: [R] Printing data.frame data: alternatives to print?

2010-10-29 Thread Jan van der Laan
Matt, Below are three (of the probably many more) possible ways of doing this: aggregate(1:nrow(df), df, length) ftable(1 ~ f1 + f2, data=df) library(plyr) ddply(df, .(f1,f2), nrow) Regards, Jan On 29-10-2010 15:53, Matthew Pettis wrote: Hi, I have a data frame with two factors (well,

Re: [R] quiry on paste() function

2010-10-29 Thread Jan van der Laan
Perhaps, the following construct does what you need: paste(c(a, b, c), c(,, :, ), sep=,collapse=) Regards, Jan On 29-10-2010 10:49, Ron Michael wrote: Hi all, I want to club different objects (character type) to a single one and using paste() function that can be done happily. However the

[R] Reading multiple .csv-files and assigning them to variable names

2010-10-29 Thread Sarah Moens
Hi all, I've been trying to find a solution for the problem of reading multiple files and storing them in a variable that contains the names by which I want to call the datasets later on. For example (5 filenames): - The filenames are stored in one variable: filenames = paste(paste('name', '_',

[R] ksvm problem

2010-10-29 Thread Neeti
Hi to all! When I use the example from kernlab::ksvm this works fine.. Give me the result… filter - ksvm(type~.,data=spamtrain,kernel=rbfdot,kpar=list(sigma=0.05),C=5,cross=3) But as soon as I change the type data as follows type_train-spamtrain[,ncol(spamtrain)] filter -

Re: [R] Reading multiple .csv-files and assigning them to variable names

2010-10-29 Thread jim holtman
Read them into a list; much easier to handle: myList - lapply(filenames, read.csv) On Fri, Oct 29, 2010 at 5:16 AM, Sarah Moens sara...@telenet.be wrote: Hi all, I've been trying to find a solution for the problem of reading multiple files and storing them in a variable that contains the

Re: [R] Clustering

2010-10-29 Thread David Winsemius
On Oct 29, 2010, at 5:14 AM, dpender wrote: That's helpful but the reason I'm using clusters in evd is that I need to specify a time condition to ensure independence. I believe this is the first we heard about any particular function or package. I therefore have an output We

Re: [R] Checking existance of a directory

2010-10-29 Thread Prof Brian Ripley
On Fri, 29 Oct 2010, Ron Michael wrote: Hi all, I am wondering is there any way to check whether some Directory exists or not, given the parent path of that directory? After searching for a while I found that there is a function dir.create() to create some directory. However I need to know

Re: [R] strftime vs strptime ??

2010-10-29 Thread Prof Brian Ripley
strptime() takes a character vector and makes a date-time object. That is input. strftime() takes a date-time object and makes an character vector. That is output, and it is normally called via format() or print(). Let's see what the help says (slightly edited to refer just to these two):

Re: [R] Printing data.frame data: alternatives to print?

2010-10-29 Thread jim holtman
Is this what you want: df f1 f2 1 Maj I Minor A 2 Maj I Minor A 3 Maj I Minor A 4 Maj II Minor A 5 Maj II Minor B 6 Maj II Minor B 7 Maj III Minor B 8 Maj III Minor C 9 Maj III Minor C df[!duplicated(df),] f1 f2 1 Maj I Minor A 4 Maj II Minor A 5 Maj II

Re: [R] strftime vs strptime ??

2010-10-29 Thread David Winsemius
On Oct 29, 2010, at 6:55 AM, skan wrote: Hello Could anyone explain me the difference between strftime vs strptime, please ? I've read the help but it's a little bit cionfusing for me. You should focus on the Value section of the help page. They return vectors of different classes.

Re: [R] Printing data.frame data: alternatives to print?

2010-10-29 Thread Matthew Pettis
I think that'll work... thanks! matt On Fri, Oct 29, 2010 at 9:45 AM, jim holtman jholt...@gmail.com wrote: Is this what you want: df       f1      f2 1   Maj I Minor A 2   Maj I Minor A 3   Maj I Minor A 4  Maj II Minor A 5  Maj II Minor B 6  Maj II Minor B 7 Maj III Minor B 8 Maj

Re: [R] Reading multiple .csv-files and assigning them to variable names

2010-10-29 Thread Gabor Grothendieck
On Fri, Oct 29, 2010 at 5:16 AM, Sarah Moens sara...@telenet.be wrote: Hi all, I've been trying to find a solution for the problem of reading multiple files and storing them in a variable that contains the names by which I want to call the datasets later on. For example (5 filenames): -

[R] Contract programming position at Merck (NJ, USA)

2010-10-29 Thread Liaw, Andy
Job: Scientific programmer at Merck, Biostatistics, Rahway, NJ, USA [Job Description] This position works closely with statisticians to process and analyze ultrasound, MRI, and radiotelemetry longitudinal studies using a series of programs developed in R and Mathworks/Matlab. This position

[R] doubt in climate variability analysis in R!

2010-10-29 Thread govindas
Hello all, I am trying to use clim.pact package for my work, but since this is the beginning for me to use gridded datasets in R, I am having some trouble. I want to do seasonal analyses like trends, anomalies, variograms, EOF and probably kriging too to downscale my 1 degree

[R] I got lot in the permutation

2010-10-29 Thread cbbaniya
Thanks for your help. May be I can not make clear by my writing. The statement which I am going to do is like this To test such null hypotheses we used the Monte Carlo test, i.e. we chose randomly (5000 times) a value for the current dependent characteristic (richness or actual species pool) in

Re: [R] Clustering

2010-10-29 Thread dpender
Apologies for being vague, The structure of the output is as follows: $ cluster1 : Named num [1:131] 3.05 2.71 3.26 2.91 2.88 3.11 3.21 -1 2.97 3.39 ... ..- attr(*, names)= chr [1:131] 6667 6668 6669 6670 ... With 613 clusters. What I require is abstracting the first and last value of

Re: [R] Please help me about Monte Carlo Permutation

2010-10-29 Thread Chitra
Hi dear Mi³ego dnia, I am sorry I got lost here. May be it it sound if I write you about what I am going to do. To test such null hypotheses we used the Monte Carlo test, i.e. we chose randomly (5000 times) a value for the current dependent characteristic (richness or actual species pool) in the

Re: [R] Cox Proportional Models and Haplotypes

2010-10-29 Thread Brad McNeney
You could do a weighted cox ph model, with possible haplotype configurations for each subject weighted by their posterior probabilities given genotype data. Are your markers SNPs? If so you can use a utility function from the hapassoc package to get started. For example, if your data is in a

Re: [R] draw path diagram using dot

2010-10-29 Thread eshi
Dear John, Thank you very much for your help! I appreciate it. eshi -- View this message in context: http://r.789695.n4.nabble.com/draw-path-diagram-using-dot-tp3017987p3019359.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] Clustering

2010-10-29 Thread David Winsemius
On Oct 29, 2010, at 11:37 AM, dpender wrote: Apologies for being vague, The structure of the output is as follows: Still no code? $ cluster1 : Named num [1:131] 3.05 2.71 3.26 2.91 2.88 3.11 3.21 -1 2.97 3.39 ... ..- attr(*, names)= chr [1:131] 6667 6668 6669 6670 ... With 613

[R] Tukey post hoc comparison (glht?) after 3factorial mixed model (lmer)

2010-10-29 Thread Anna Radtke
Hello, dear R-community. This is a question about TukeyHSD between factor combinations of a Three-Way ANOVA, which is - since it is a multi measure ANOVA - not a simple ANOVA but a Generalised Linear Mixed Model (GLMM), calculated with lmer. growth -

Re: [R] Clustering

2010-10-29 Thread David Winsemius
On Oct 29, 2010, at 12:08 PM, David Winsemius wrote: On Oct 29, 2010, at 11:37 AM, dpender wrote: Apologies for being vague, The structure of the output is as follows: Still no code? $ cluster1 : Named num [1:131] 3.05 2.71 3.26 2.91 2.88 3.11 3.21 -1 2.97 3.39 ... ..- attr(*,

[R] Repeated Measures MANOVA

2010-10-29 Thread Christopher Kurby
Hello all, Is there an r function that exists that will perform repeated measures MANOVAs? For example, let's say I have 3 DVs, one between-subjects IV, and one within-subjects IV. Based on the documentation for the manova command, a function like that below is not appropriate because it

Re: [R] scatterplot3d; scaling point symbols to depth of graph

2010-10-29 Thread Uwe Ligges
I had a look: I fixed it 5 months ago and forgot to make a new release. The version on R-forge contains the fix already. New release on its way to CRAN. Best wishes; Uwe On 28.10.2010 11:28, John Coulthard wrote: Hi I'm trying to scale the point symbols on a 3d plot so that the ones at

Re: [R] Repeated Measures MANOVA

2010-10-29 Thread John Fox
Dear Chris, See the examples in ?Anova in the car package (but it works with a model fit by lm). I hope this helps, John John Fox Senator William McMaster Professor of Social Statistics Department of Sociology McMaster University Hamilton, Ontario, Canada

Re: [R] doubt in climate variability analysis in R!

2010-10-29 Thread Daniel Nordlund
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of govin...@msu.edu Sent: Friday, October 29, 2010 8:33 AM To: r-help@r-project.org Subject: [R] doubt in climate variability analysis in R! Hello all, I am trying to use

[R] Plotting 2 Lines on the Same Chart

2010-10-29 Thread Jason Kwok
How do I plot two time series plots on the same chart? Thanks, Jason [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Dickey Fuller Test

2010-10-29 Thread Cuckovic Paik
Thanks a lot for your answers, Dennis and Bernhard! -- View this message in context: http://r.789695.n4.nabble.com/Dickey-Fuller-Test-tp3018408p3019544.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing

Re: [R] Plotting 2 Lines on the Same Chart

2010-10-29 Thread Gabor Grothendieck
On Fri, Oct 29, 2010 at 1:41 PM, Jason Kwok jayk...@gmail.com wrote: How do I plot two time series plots on the same chart? Try this: example(plot.ts) example(ts.plot) library(zoo) example(plot.zoo) library(lattice) example(xyplot.zoo) -- Statistics Software Consulting GKX Group, GKX

Re: [R] Plotting 2 Lines on the Same Chart

2010-10-29 Thread Jason Kwok
Thanks. 1 more question. When I use Plot(series1) lines(series2) The graph will use the y axis scaling for series 1 so some of series 2 is cut off. How do I control the y axis scaling? Thanks, Jason On Fri, Oct 29, 2010 at 2:10 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: On

Re: [R] Plotting 2 Lines on the Same Chart

2010-10-29 Thread Gabor Grothendieck
On Fri, Oct 29, 2010 at 2:30 PM, Jason Kwok jayk...@gmail.com wrote: Thanks.  1 more question. When I use Plot(series1) lines(series2) The graph will use the y axis scaling for series 1 so some of series 2 is cut off.  How do I control the y axis scaling? Plot them together as a

Re: [R] doubt in climate variability analysis in R! - code included!

2010-10-29 Thread govindas
the following code was used library(akima) library(clim.pact) nc.1 - RF_80-05.nc nc.rf.in - open.ncdf(nc.1) x1 - retrieve.nc(nc.1, v.nam=Rainfall,l.scale=FALSE,  x.rng=c(70, 80), y.rng=c(10, 13.5)) #dimension is checked for the subset. (lon, lat, time) is changed as (time, lat, lon)

[R] Tukey post hoc comparison (glht?) after 3factorial mixed model (lmer)

2010-10-29 Thread Anna Radtke
Hello, dear R-community. This is a question about TukeyHSD between factor combinations of a Three-Way ANOVA, which is - since it is a multi measure ANOVA - not a simple ANOVA but a Generalised Linear Mixed Model (GLMM), calculated with lmer. growth -

[R] Memory use in R

2010-10-29 Thread DM2010
Dear R Users I have two questions about how R makes use of memory on a Windows computer. On my machine certain R jobs seem to stop with messages such as... Error: cannot allocate vector of size 215.0 Mb ...when, according to Windows Task Manager, there are still hundreds of megabytes of

Re: [R] help pages do not open

2010-10-29 Thread Dimitri Liakhovitski
I tried one more thing - I uninstalled R again, and this time installed it under: C:\Users\Myname\R\R-2.12.0 And again - am gettting the same error: Error in shell.exec(url) : access to 'http://127.0.0.1:30111/library/stats/html/lm.html' denied Any help is greatly appreciated! Dimitri On Fri,

[R] One-class SVM

2010-10-29 Thread ANJAN PURKAYASTHA
Does any R package support one-class SVM? I'm trying to develop an application to detect anomalies in genome sequencing. Thanks in advance. Anjan -- === anjan purkayastha, phd. research associate fas center for systems biology, harvard university 52 oxford street

Re: [R] help pages do not open

2010-10-29 Thread Dimitri Liakhovitski
Problem solved. It turned out I had to reset my IE as my default browser for all extentions (like .html). Now, R help is working! Dimitri On Fri, Oct 29, 2010 at 4:20 PM, Dimitri Liakhovitski dimitri.liakhovit...@gmail.com wrote: I tried one more thing - I uninstalled R again, and this time

Re: [R] help pages do not open

2010-10-29 Thread Joshua Wiley
Hi Dimitri, The help pages should be loaded from a local server (which is corroborated by the 127...ip), so the internet connection should not matter. I would check whether IE is the default application for .html extensions, and you could also try running R as an admin (though I do not really

[R] R version 2-12.0 - running as 32 or as 64 bit?

2010-10-29 Thread Dimitri Liakhovitski
Question: I installed R verison 2-12.0 on my Windows 7 (64 bit) PC. When I was installing it, it did not ask me anything about 32 vs. 64 bit. So, if I run R now - is it running as a 32-bit or a 64-bit? thank you! -- Dimitri Liakhovitski Ninah Consulting www.ninah.com

Re: [R] R version 2-12.0 - running as 32 or as 64 bit?

2010-10-29 Thread Berwin A Turlach
G'day Dimitri, On Fri, 29 Oct 2010 16:45:00 -0400 Dimitri Liakhovitski dimitri.liakhovit...@gmail.com wrote: Question: I installed R verison 2-12.0 on my Windows 7 (64 bit) PC. When I was installing it, it did not ask me anything about 32 vs. 64 bit. So, if I run R now - is it running as a

Re: [R] One-class SVM

2010-10-29 Thread Steve Lianoglou
Hi, On Fri, Oct 29, 2010 at 4:24 PM, ANJAN PURKAYASTHA anjan.purkayas...@gmail.com wrote: Does any R package support one-class SVM? I'm trying to develop an application to detect anomalies in genome sequencing. I'm pretty sure kernlab supports this:

[R] NetWorkSpace from REvolution; Distributed Computing setup questions

2010-10-29 Thread Timothy Murphy
***Summary:*** I'm setting up a cluster using netWorkSpace, and I'm having issues with the sleigh initialization. My R function to initialize the sleigh succeeds and the sleigh appears to be ready, but I get apparently conflicting information from status(s), rankCount(s), and s; and basic sleigh

Re: [R] R version 2-12.0 - running as 32 or as 64 bit?

2010-10-29 Thread Duncan Murdoch
On 29/10/2010 4:45 PM, Dimitri Liakhovitski wrote: Question: I installed R verison 2-12.0 on my Windows 7 (64 bit) PC. When I was installing it, it did not ask me anything about 32 vs. 64 bit. So, if I run R now - is it running as a 32-bit or a 64-bit? If it didn't ask you about it, then it

Re: [R] Memory use in R

2010-10-29 Thread Duncan Murdoch
On 29/10/2010 12:46 PM, DM2010 wrote: Dear R Users I have two questions about how R makes use of memory on a Windows computer. On my machine certain R jobs seem to stop with messages such as... Error: cannot allocate vector of size 215.0 Mb ...when, according to Windows Task Manager, there

Re: [R] SARIMA simulation using time series history

2010-10-29 Thread Knut Erik Vedahl
Thank you for your suggestion, Juan. However, I have tried to specify the innovations and this doesn't seem to solve the problem. Are there really no opportunities to simulate from a (S)ARIMA model using past observations in R, besides to make the whole script from the ground? Knut

[R] how to debug (mtrace) a function defined inside a function?

2010-10-29 Thread Andre Zege
Hi, everyone. I am using a fair amount of closures in my code. Problem i am experiencing is i cannot figure out how to mtrace functions defined within a function. There must be some way to name such function for mtrace to see it and let me step into it. For example, say i have code

Re: [R] R version 2-12.0 - running as 32 or as 64 bit?

2010-10-29 Thread Dimitri Liakhovitski
Actually, Berwin - you are right. I also did get 2 shortcuts. I just thought that one of them was old - from my previous R installations. And indeed the 4th line tells what version is running. Great! Thank you! Dimitri On Fri, Oct 29, 2010 at 5:02 PM, Berwin A Turlach ber...@maths.uwa.edu.au

Re: [R] how to debug (mtrace) a function defined inside a function?

2010-10-29 Thread Duncan Murdoch
On 29/10/2010 5:19 PM, Andre Zege wrote: Hi, everyone. I am using a fair amount of closures in my code. Problem i am experiencing is i cannot figure out how to mtrace functions defined within a function. There must be some way to name such function for mtrace to see it and let me step into it.

[R] plot pdf

2010-10-29 Thread mmstat
I want to plot the unstadardized version of a normal plot.  Can you explain why that is not working? Dev.set(1) xcrit=-1.645 cord.x - c(-3,seq(-3,xcrit,0.01),xcrit) cord.y - c(0,dnorm(seq(-3,xcrit,0.01)),0)            # what does final 0 do here?

[R] How to scan df from a specific word?

2010-10-29 Thread M.Ribeiro
Hi R-helpers, I need to read some file with different lines (I don't know the number of lines to skip) and I would like to find a way to start reading the data.frame from the word source. ex: djhsafk asdfhkjash shdfjkash asfhjkash #those lines contain numbers and words, I want to skip

Re: [R] How to scan df from a specific word?

2010-10-29 Thread M.Ribeiro
Sorry, the explanation wasn't very good...just to explain better. I am writing a loop to read and process different files in the same script. And what I want to load into a variable is a data.frame that is above the word source in all of my files. So I would like to recognize the word Source in

Re: [R] How to scan df from a specific word?

2010-10-29 Thread M.Ribeiro
Sorry, the explanation wasn't very good...just to explain better. I am writing a loop to read and process every time a different file in the same script. And what I want to load into a variable each time is a data.frame that is bellow the word source in all of my files. So I would like to

[R] vertical list sum

2010-10-29 Thread Gregory Ryslik
Hi Everyone, I have a list of vectors like this (in this case it's 3 vectors but assume the vector count and the length of each vector is not known): [[1]] [1] 9 5 7 2 14 4 4 3 [[2]] [1] 3 6 25 2 14 3 3 4 [[3]] [1] 28 4 14 3 14 2 4 5 What I want to do is take the average

[R] Differenciate numbers from reference for rows

2010-10-29 Thread M.Ribeiro
So, I am having a tricky reference file to extract information from. The format of the file is x 1 + 4 * 3 + 5 + 6 + 11 * 0.5 So, the elements that are not being multiplied (1, 5 and 6) and the elements before the multiplication sign (4 and 11) means actually the reference for the row in a

Re: [R] vertical list sum

2010-10-29 Thread Jorge Ivan Velez
Hi Greg, Here are two ways of doing it: mylist - list(x = rpois(10, 10), y = rpois(10, 20), z = rpois(10, 5)) mylist $x [1] 3 13 14 16 10 7 3 5 12 14 $y [1] 17 16 26 13 23 24 16 28 23 12 $z [1] 2 6 5 5 5 1 9 11 6 4 colMeans(do.call(rbind, mylist), na.rm = TRUE) [1]

Re: [R] How to scan df from a specific word?

2010-10-29 Thread Phil Spector
It might be easier to preprocess the file before passing it to R, but you an do what you want using a connection: f = file('s.dat','r') while(1){ + txt = readLines(f,1) + if(length(grep('Source',txt)))break; + } while(1){ + more = readLines(f,1) + if(nchar(more) == 0)break; + txt =

Re: [R] How to scan df from a specific word?

2010-10-29 Thread Peter Langfelder
Sorry, this isn't really an R solution, but here it goes anyway. You can isolate the block from Source to the first following blank line by the following unix/linux/cygwin command, assuming inFile is your input file and outFile is the output file: cat inFile | grep -A 100 Source | grep -m 1 -B

Re: [R] vertical list sum

2010-10-29 Thread Duncan Mackay
Hi Jorge I tried your methods for all (which work for complete rows) and then I remove the first value of $y and repeated; both fail because of the unequal numbers The problem is when there are unequal numbers in the rows and trying to make a matrix of them. I was trying some things with

Re: [R] vertical list sum

2010-10-29 Thread Duncan Mackay
Aplogies to the original poster - I got names wrong in a cut and paste Hi Jorge I tried your methods for all (which work for complete rows) and then I remove the first value of $y and repeated; both fail because of the unequal numbers The problem is when there are unequal numbers in the

Re: [R] How to scan df from a specific word?

2010-10-29 Thread Gabor Grothendieck
On Fri, Oct 29, 2010 at 6:34 PM, M.Ribeiro mresende...@yahoo.com.br wrote: Hi R-helpers, I need to read some file with different lines (I don't know the number of lines to skip) and I would like to find a way to start reading the data.frame from the word source. ex: djhsafk asdfhkjash

[R] date calculation

2010-10-29 Thread Shi, Tao
Hi list, Could someone explain to me why the following result is not a integer? difftime(strptime(24NOV2004, format=%d%b%Y), strptime(13MAY2004, format=%d%b%Y), units=days) Time difference of 195.0417 days I'm using R2.12.0 on WinXP. Thanks! ...Tao

Re: [R] date calculation

2010-10-29 Thread Phil Spector
Tao - The documentation for the difftime function says: Function ‘difftime’ calculates a difference of two date/time objects and returns an object of class ‘difftime’ with an attribute indicating the units. So that answers your question. If you want it to be an integer, you're

Re: [R] vertical list sum

2010-10-29 Thread Gregory Ryslik
Hi, Ah! Thanks for your help! I have even seen Reduce before but for some reason just didn't make the connection. This helps a ton! Thanks again. Kind regards, Greg On Oct 29, 2010, at 6:53 PM, Jorge Ivan Velez wrote: Hi Greg, Here are two ways of doing it: mylist - list(x = rpois(10,

Re: [R] R and Matlab

2010-10-29 Thread Henrik Bengtsson
Hi. On Fri, Oct 29, 2010 at 3:31 AM, Claudia Beleites cbelei...@units.it wrote: Dear Henrik, sorry for bothering you with a report hastily pasted together and not particularly nice for you as I used my toy data flu from a non-standard package. I should have better used e.g. the iris. I'm

Re: [R] vertical list sum

2010-10-29 Thread Jorge Ivan Velez
Hi Duncan, If vectors of unequal length is the problem, one way to go, using your example, would be: # your example x - list(c(9, 5, 7, 2, 14, 4, 4, 3), c(3, 6, 25, 2, 14, 3, 3, 4), c(28, 4, 14, 3, 14, 2, 4, 5), 28) x # maximum number of components k - max(sapply(x, length)) k # expanding

Re: [R] plot pdf

2010-10-29 Thread Joshua Wiley
Hi Mary, I am not sure off hand why savePlot() is not doing what you expect, but hopefully my inline comments answer your other questions and at least get you the graphs you want. Cheers, Josh On Fri, Oct 29, 2010 at 3:18 PM, mms...@comcast.net wrote: I want to plot the unstadardized

[R] grouping question

2010-10-29 Thread will phillips
Hello I have what is probably a very simple grouping question however, given my limited exposure to R, I have not found a solution yet despite my research efforts and wild attempts at what I thought might produce some sort of result. I have a very simple list of integers that range between 1

Re: [R] grouping question

2010-10-29 Thread jim holtman
try this: x [1] 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 y - cut(x, breaks=c(-Inf,6,18, Inf), labels=c('a','b','c')) levels(y) - c('night','day','night') y [1] night night night night night night night day day day day day day day day day day

Re: [R] grouping question

2010-10-29 Thread Jorge Ivan Velez
Hi Will, One way would be: x [1] 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 factor(ifelse(x6 x18, 'day', 'night')) [1] night night night night night night night day day day day day day day day [16] day day day night night night night night

Re: [R] grouping question

2010-10-29 Thread will phillips
Hello Jim Wow. I tried cut but i see you have an interim step with labels a,b,c but levels night and day. i was really close to this. i have labels night,day,night and it wouldn't let me duplicate labels. I am very greatful for your input Will -- View this message in context:

Re: [R] grouping question

2010-10-29 Thread will phillips
Hello Jorge, Thank you for the reply. I tried a few different things with if/else but couldn't get them to go. I really appreciate your feedback. I learned something new from this Will -- View this message in context: http://r.789695.n4.nabble.com/grouping-question-tp3019922p3019952.html

  1   2   >