Re: [R] Using McNemar's test to detect shifts in response from pre- topost-treatment

2010-09-14 Thread Peter Dalgaard
On 09/14/2010 08:58 PM, Robert Baer wrote: > McNemar is good for paired data. See > ?mcnemar.test > > You need to get your data into the form of a matrix (e.g., help example), > and you will need data organized by concordant and discordant pairing. > > This means that you will need to organize y

[R] HDP and 99% contour lines

2010-09-14 Thread Peter Spencer
Dear all, I have a very simple question about how I can include HPD confidence lines in a Marginal posterior distribution scatterplot I have the following code to draw the scatterplot(s) from an output table; par(mfrow=c(2,2)) plot(temp1[,5], temp1[,6], xlab="log10(r)", ylab

[R] retrieving object names passed indirectly to a function

2010-09-14 Thread Michael Bedward
Hi folks, I'm stuck with a problem that I suspect has a trivial solution... I have a function, call it foo, that takes a number of arguments which it uses as parameters for a simulation. For later analysis, foo stores the names of the objects passed to it along with the simulation results in its

Re: [R] how to compute when row length is different

2010-09-14 Thread rasanpreet
thank you so much Dennis...i got it[?] On Tue, Sep 14, 2010 at 7:01 AM, Dennis Murphy [via R] < ml-node+2539020-1932381782-160...@n4.nabble.com > wrote: > Hi: > > Just to be different, here's a data.table solution: > > library(data.table) > > # It's always a good idea to have your merge key vari

[R] Using feather.plot to try and generate a stick plot of current velocity data (and having issues)

2010-09-14 Thread Hughes, Ed
Hello All, I am attempting to use the feather.plot function from the plotrix package to graph current velocity data as I have speed and direction. I let "r" be the first 10 rows of current speed data and "theta" be the first 10 rows of directional data in radians. I had tried this with 10 mea

Re: [R] for loop help

2010-09-14 Thread Michael Bedward
Hello, So you want to sum Value by Name and assign to an object in your workspace called Name ? (it's best to say specifically what the desired output is when you post a question here). Assuming your data are in a matrix or data.frame called foo, you could use a for loop as follows... for (nm i

[R] Partialy SOLVED Re: Problems with "pdf" device using "plot" "glht" function on "multcomp" library.

2010-09-14 Thread Kenneth Roy Cabrera Torres
Hi R users: I found a workaround for the problem I posted today. I simple use "Cairo" library, then I use CairoPDF() function, and it works!!! The reason maybe is the acrobat reader, because the "okular" reader from Ubuntu Linux shows the graphics just right. Thank you for your help and advice.

Re: [R] Can I monitor the iterative/convergence process whileusing Optim or MaxLik?

2010-09-14 Thread Ravi Varadhan
Yes, of course! The Nelder-Mead is derivative-free. Thanks, Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email:

Re: [R] extracting objects from lists

2010-09-14 Thread Dennis Murphy
Hi: On Tue, Sep 14, 2010 at 11:13 AM, lord12 wrote: > > If you have 5 data frames and you append them to a list, how do you access > the first data frame, not the first value of the first data frame while > iterating in a for loop? > For a list named l, l[[1]] accesses the first component, or i

Re: [R] for loop help

2010-09-14 Thread Bill.Venables
An envorniment is a hash table. There are several packages that you might care to look at, e.g. filehasn -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of lord12 Sent: Wednesday, 15 September 2010 7:06 AM To: r-help@r-project.org Su

Re: [R] for loop help

2010-09-14 Thread Bill.Venables
Most likely. If you care to be more specific, we might be able to give you a more specific answer. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of lord12 Sent: Wednesday, 15 September 2010 6:30 AM To: r-help@r-project.org Subject

Re: [R] for loop help

2010-09-14 Thread lord12
How do I create a hash table using R? -- View this message in context: http://r.789695.n4.nabble.com/for-loop-help-tp2539621p2539657.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.

[R] for loop help

2010-09-14 Thread lord12
If you have: Name Value A 2 A 3 A 4 B 5 B 6 B7 In R how do you assign one value to the name: A:9 B:18 -- View this message in context: http://r.789695.n4.nabble.com/for-loop-help-tp2539621p2539621.html Sent from the R help mailin

Re: [R] rnorm using vector of means and SDs

2010-09-14 Thread Dennis Murphy
Hi: Here's a way to do it with mdply() in the plyr package: # Set up a two column data frame of parameters, whose column names are mean and sd: pars <- data.frame(mean = rpois(100, 10), sd = rpois(100, 5)) mysmp <- mdply(pars, rnorm, n = 1000) > dim(mysmp) [1] 100 1001 # 100 rows of samples

Re: [R] splines package (problem finding it)

2010-09-14 Thread stephen sefick
Sorry for the trouble. I thought it was an add-on. kindest regards, Stephen 2010/9/14 Uwe Ligges : > > > On 14.09.2010 13:25, stephen sefick wrote: >> >> I can not install the splines package.  Has it been removed/moved from/on >> CRAN? >> kindest regards, > > > It should come with R since it is

[R] kernlab ipop solver value dual

2010-09-14 Thread Ron Burns
Hi all, Can anyone tell me for what the kernlab ipop return value dual is? How does it relate to the solution for a Support Vector Machine solution? I am trying to use the ipop solver in my (toy) example of a Support Vector Machine and I am noting that the bias (essentially the offset for th

Re: [R] Can I monitor the iterative/convergence process whileusing Optim or MaxLik?

2010-09-14 Thread William Dunlap
I think the default method for optim never evaluates the gradient function: VALUE and X are both NULL in your example. Also o$counts shows NA for the gradient entry. Use method="BGFS": > o <- optim(c(-1.2, 1), fr, tfr <- trackFn(grr), method="BFGS") > with(environment(tfr), str(VALUE)) num [1:4

Re: [R] influence measures for multivariate linear models

2010-09-14 Thread Michael Friendly
I'm following up on a question I posted 8/10/2010, but my newsreader has lost this thread. Barrett & Ling, JASA, 1992, v.87(417), pp184-191 define general classes of influence measures for multivariate regression models, including analogs of Cook's D, Andrews & Pregibon COVRATIO, etc. As in

Re: [R] Can I monitor the iterative/convergence process while using Optim or MaxLik?

2010-09-14 Thread Ravi Varadhan
Bill, I am not able to get this to work for tracking inside the gradient function: trackFn <- function (fn) { # return function like fn that stashes its # inputs and outputs in local datasets. X <- NULL VALUE <- NULL force(fn) function(x) { X <<- rbind(X, x) # stash arguments val <- fn(x) VALUE <

Re: [R] Can I monitor the iterative/convergence process while using Optim or MaxLik?

2010-09-14 Thread William Dunlap
You can also save the objective (or gradient) function arguments and values in datasets so you can later plot or print them. E.g., the following lets you avoid hand editing the objective function to do this. If you wanted to track the gradient, replace th c(VALUE,val) with rbind(VALUE,val). (Eit

Re: [R] Can I monitor the iterative/convergence process while using Optim or MaxLik?

2010-09-14 Thread Ravi Varadhan
This is generally not the best way to do it for the following reasons. The objective function may be evaluated multiple times within a single iteration, for various reasons including (i) gradient evaluation when analytic gradient is not specified, and (ii) during line-search stretgy for stepl

Re: [R] Can I monitor the iterative/convergence process while using Optim or MaxLik?

2010-09-14 Thread Arne Henningsen
On 14 September 2010 21:49, Sally Luo wrote: > Is it possible that I have the estimates from each step/iteration shown on > the computer screen in order to monitor the process while I am using Optim > or MaxLik? > You can call maxLik() with argument "print.level" set to a value larger than 0. /

Re: [R] Can I monitor the iterative/convergence process while using Optim or MaxLik?

2010-09-14 Thread Greg Snow
The simple way to do this is just to rewrite your function to be optimized to print out the current values that it was called with, this way you will see where it is and what it is doing. Look at the cat function for how to print the values, also look at the flush.console function. For example

[R] Can I monitor the iterative/convergence process while using Optim or MaxLik?

2010-09-14 Thread Sally Luo
Hi R-helpers, Is it possible that I have the estimates from each step/iteration shown on the computer screen in order to monitor the process while I am using Optim or MaxLik? Thanks for your help. Maomao [[alternative HTML version deleted]] _

Re: [R] predict(backSpline(x)): losing my marbles?

2010-09-14 Thread Greg Snow
Ben, I am pretty sure that you have found a bug, I am just not sure where exactly the bug would be. The problem comes from the fact that your bsp object has the knots in decreasing order, if we reverse the order like this: bsp3 <- bsp bsp3$knots <- rev(bsp$knots) bsp3$coefficients <- bsp$coef

[R] multiple cores/building fails

2010-09-14 Thread Gregory Ryslik
Hi Everyone, I have written debugged and tested my code and it works (yay!). I recently tried to parallelize it (1 core/per tree) and when I run the code I get an error saying the object "control" was not found. I do have an object control in my code but it always works fine as long as I am not

Re: [R] Problem with cat() == A related question

2010-09-14 Thread William Revelle
At 3:45 PM -0400 9/14/10, jim holtman wrote: The problem is the 'cat' enclosing the 'print'; just get rid of the 'cat' -- that is what is causing the extra output On Tue, Sep 14, 2010 at 3:34 PM, Peng, C wrote: It is still visible even it is set invisible(NULL): fn1 <- function(n = 5){

Re: [R] extracting objects from lists

2010-09-14 Thread jim holtman
First create a list of the dataframe and then do the loop: myList <- list(d1, d2, d3, d4, d5) for (i in myList) print(i) or for (i in seq(length(myList))) print(myList[[i]]) On Tue, Sep 14, 2010 at 2:13 PM, lord12 wrote: > > If you have 5 data frames and you append them to a list, how do you

Re: [R] Problem with cat() == A related question

2010-09-14 Thread jim holtman
The problem is the 'cat' enclosing the 'print'; just get rid of the 'cat' -- that is what is causing the extra output On Tue, Sep 14, 2010 at 3:34 PM, Peng, C wrote: > > It is still visible even it is set invisible(NULL): > >>  fn1 <- function(n = 5){ > +  mat <- matrix(rnorm(5*5), 5, 5) > +   ca

Re: [R] ggplot: stat_smooth() and nls method

2010-09-14 Thread Brian Diggs
On 9/11/2010 7:52 AM, Benoit Boulinguiez wrote: Hi all, Does one of you know if there is any way to combine a "nls" method in the stat_smooth of ggplot? Regards According to the documentation for predict.nls, it is unable to create standard errors for the predictions, so that has to be turne

Re: [R] Problem with cat() == A related question

2010-09-14 Thread Peng, C
It is still visible even it is set invisible(NULL): > fn1 <- function(n = 5){ + mat <- matrix(rnorm(5*5), 5, 5) + cat(print(mat)) + invisible(NULL)} > fn1() [,1][,2] [,3][,4] [,5] [1,] -1.22767085 -1.41468587 -2.0156231 0.29732942 0.5755600 [2,]

Re: [R] rnorm using vector of means and SDs

2010-09-14 Thread Phil Spector
I think t(mapply(rnorm,1000,vector_of_means,vector_of_sds)) will do what you want. - Phil Spector Statistical Computing Facility Department of Statistics

Re: [R] rnorm using vector of means and SDs

2010-09-14 Thread Greg Snow
Try something like: out <- matrix( rnorm( 1000 * 100, rep(vector_of_means, 1000), rep(vector_of_sds, 1000) ), nrow=100 ) -- 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-pro

[R] Package build and install under Windows

2010-09-14 Thread Tao
Any other method besides using RTOOLS? I am using R 2.10.1, which version of Rtools should I use? It seems that there are two versions on the website. The commands like R CMD build should be used in the CMD window, right? Thanks. -- View this message in context: http://r.789695.n4.nabble.com/Pac

Re: [R] Error: cannot allocate vector of size X.0 Mb

2010-09-14 Thread Martin Morgan
On 09/14/2010 08:02 AM, Marc Schwartz wrote: > On Sep 14, 2010, at 9:47 AM, John1983 wrote: > >> >> Yes I see. So I typed as you mentioned and I get an 8 (therefore >> this is a 64-bit R). >> >> Is there anything else I need to check to remove this error? > > > 1. Add more RAM. > > 2. Dependi

[R] rnorm using vector of means and SDs

2010-09-14 Thread J.K. Bruxer
Hi, I want to sample from a distribution (say a normal distribution, for example) using vectors of the different parameters (i.e. the mean and standard deviation). That is, I have a list/vector of say 100 means and another of the corresponding 100 SD's, and I want a matrix of 100 rows (one for

Re: [R] Multiple CPU HowTo in Linux?

2010-09-14 Thread Martin Morgan
On 09/14/2010 08:36 AM, Christian Raschke wrote: > Edwin, > > I'm not sure what you mean by "adapting"; other than installing > multicore, there is nothing else to set up. How and whether you could > then parallelise your code strongly depends on the specific problem you > are facing. > > What ha

Re: [R] Using McNemar's test to detect shifts in response from pre- topost-treatment

2010-09-14 Thread Robert Baer
McNemar is good for paired data. See ?mcnemar.test You need to get your data into the form of a matrix (e.g., help example), and you will need data organized by concordant and discordant pairing. This means that you will need to organize your data differently than you show us: # pairs YES YE

Re: [R] Reading highest numbered file

2010-09-14 Thread Erik Iverson
See ?list.files and ?file.info. E.g., file.info(list.files("~/tmp", full.names = TRUE)) Michael D wrote: I have a bunch of files named "[identifier1].[identifier2].[mmdd].[hhmmss].txt" and im having trouble updating my read script for the timestamp. I've been using file.exists and a for l

[R] extracting objects from lists

2010-09-14 Thread lord12
If you have 5 data frames and you append them to a list, how do you access the first data frame, not the first value of the first data frame while iterating in a for loop? list = c(d1,d2,d3,d4,d5) where d1..d5 are dataframes. for(i in 1: length(list)){ print(list[1]) } -- View this message in c

[R] Reading highest numbered file

2010-09-14 Thread Michael D
I have a bunch of files named "[identifier1].[identifier2].[mmdd].[hhmmss].txt" and im having trouble updating my read script for the timestamp. I've been using file.exists and a for loop but its highly inefficient and cumbersome. Would there be someway to create an object containing the stri

Re: [R] If then else with command for

2010-09-14 Thread steven mosher
not sure how you wanted sampling of x R<-142 color<-rep(0,142) for(i in 1:R){ y<-sample(x,142,replace=FALSE) onebit<- as.numeric(3471 %in% y) twobit<-as.numeric(6720 %in% y)*2 fourbit<-as.numeric(6263 %in% y)*4 colorbit<-onebit+twobit+fourbit+1 color[i]<-colorbit } On Tue, Sep 14, 2010

Re: [R] If then else with command for

2010-09-14 Thread Henrique Dallazuanna
Try this: x <- c(288,139,196,159,536,134,623,517,96,467,277,155,386,241,422,6263,612,532,250,412,339,55,290,249,164,97,74,144,1277,240,163,63,488,111,128,230,720,179,37,24,65,37,89,187,60,939,1008,81,310,58,169,38,68,190,78,807,220,226,69,179129,119,73,59,92,127,104,75,505,183,49,41,76,113,90,79,4

Re: [R] If then else with command for

2010-09-14 Thread Mestat
Yep... Got that... I just changed my data name... It worked fine... Thanks... -- View this message in context: http://r.789695.n4.nabble.com/If-then-else-with-command-for-tp2539341p2539429.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] If then else with command for

2010-09-14 Thread Adrienne Wootten
Marcio, Try this instead: x<-c(288,139,196,159,536,134,623,517,96,467,277,155,386,241,422,6263,612,532,250,412,339,55,290,249,164,97,74,144,1277,240,163,63,488,111,128,230,720,179,37,24,65,37,89,187,60,939,1008,81,310,58,169,38,68,190,78,807,220,226,69,179129,119,73,59,92,127,104,75,505,183,49,41

Re: [R] Sweave and Miktex (Sweave.sty not found)

2010-09-14 Thread Duncan Murdoch
On 14/09/2010 2:00 PM, Greg Snow wrote: I have found that if I put \include{Sweave} explicitly in my sweave source file then it finds the copy in the MikTeK folders, but if I don't then Sweave tries to add that line, but pointing to the R directory that caused the problem in the first place.

Re: [R] Sweave and Miktex (Sweave.sty not found)

2010-09-14 Thread Greg Snow
I have found that if I put \include{Sweave} explicitly in my sweave source file then it finds the copy in the MikTeK folders, but if I don't then Sweave tries to add that line, but pointing to the R directory that caused the problem in the first place. -- Gregory (Greg) L. Snow Ph.D. Statistic

Re: [R] Can I save my console contents automatically?

2010-09-14 Thread Greg Snow
Look at the txtStart function in the TeachingDemos package. It (and related functions) can be used as a glorified sink that will save both a copy of the command issued (possibly reformatted) and the results (assuming the command runs without error). Hope this helps, -- Gregory (Greg) L. Snow

[R] stratified Wilcoxon's rank sum test with the locally best weights

2010-09-14 Thread El-Tahtawy, Ahmed
Hello, I have been informed that there is no R package for the stratified Wilcoxon's rank sum test (Van Elteren's test) with the locally best weights. I need to use the alternative test to a clinical endpoint where the distribution approximate normal distribution, and compare to the regular ANOVA

Re: [R] Problem (environment?) with R CMD CHECK

2010-09-14 Thread Peter Langfelder
2010/9/14 Uwe Ligges : > I do not see any problem, we'd need to look at the package in order to help, > I think. I re-checked again and somehow the package now passes all checks, so I must have mistyped something somewhere. Sorry for that. Peter __ R-h

[R] If then else with command for

2010-09-14 Thread Mestat
Hey listers, I am trying to do something simple... Check the program below... I would like to create a variable named COLOR according to the conditions that I stablished... But the problem is that it seems that my variable COLOR is checking just on sample, may be last in the loop... Certainly, I a

Re: [R] Sweave and graphs

2010-09-14 Thread Duncan Murdoch
On 14/09/2010 1:18 PM, Katie Surrence wrote: I set my working directory to the location of the file (which I called Demo.Rnw) and I type Sweave("Demo.Rnw") at the R command line. Does that answer your question properly? Yes, that looks fine. So the problem is likely with pdflatex, or maybe

Re: [R] Homogeneity of regression slopes

2010-09-14 Thread Thomas Stewart
If you are interested in exploring the "homogeneity of variance" assumption, I would suggest you model the variance explicitly. Doing so allows you to compare the homogeneous variance model to the heterogeneous variance model within a nested model framework. In that framework, you'll have likelih

Re: [R] Sweave and graphs

2010-09-14 Thread Katie Surrence
I set my working directory to the location of the file (which I called Demo.Rnw) and I type Sweave("Demo.Rnw") at the R command line. Does that answer your question properly? On Tue, Sep 14, 2010 at 12:08 PM, Duncan Murdoch wrote: > On 14/09/2010 12:01 PM, Katie Surrence wrote: > >> Hi all, >>

Re: [R] Multivariate Regression Trees: how to identify sample units?

2010-09-14 Thread Gavin Simpson
On Tue, 2010-09-07 at 19:23 -0300, afso...@unisinos.br wrote: > Dear friends, > > I am sudying the mvpart package, that implements Multivariate > Regression Trees, aiming at applying it to a biogeographical dataset of > tree speces in southern South America. > >My doubt is how to access

Re: [R] Sweave and graphs

2010-09-14 Thread Duncan Murdoch
On 14/09/2010 12:01 PM, Katie Surrence wrote: Hi all, Having solved my Sweave.sty question, I'd like to figure out why my pdf doesn't display the graph in my demo code. Here's the demo code I'm using: http://www.stat.berkeley.edu/~houston/demo.Rnw

Re: [R] Good example ANCOVA in R

2010-09-14 Thread David Winsemius
On Sep 14, 2010, at 11:58 AM, choisj70 wrote: I could find a couple of useful examples of ANCOVA. However, any of them did not contain a good example of "how to get the adjusted means in ANCOV using R". Is there anyone who knows or has a good example of it? I'm assuming that whatever regre

[R] Sweave and graphs

2010-09-14 Thread Katie Surrence
Hi all, Having solved my Sweave.sty question, I'd like to figure out why my pdf doesn't display the graph in my demo code. Here's the demo code I'm using: http://www.stat.berkeley.edu/~houston/demo.Rnw When I run Sweave within R (version 2.11) o

Re: [R] Sweave and Miktex (Sweave.sty not found)

2010-09-14 Thread Katie Surrence
Thanks Duncan -- I'm running R 2.11 and ??texify gets me no recognition. At the moment I'm trying to get something that works -- I'm not nearly to the point of fancy. I solved my Sweave.sty problem although I'm still not managing to generate the graph in the demo file. But maybe I should make th

[R] Using McNemar's test to detect shifts in response from pre- to post-treatment

2010-09-14 Thread Paul Miller
Hello Everyone,   I've been asked to check if there is a significant difference in the following:     Pre    Post Group A 15/19 14/19 Group B 14/19 10/19   My sense is that I need to perform McNemar's test on these data because responses are correlated within pa

[R] Good example ANCOVA in R

2010-09-14 Thread choisj70
I could find a couple of useful examples of ANCOVA. However, any of them did not contain a good example of "how to get the adjusted means in ANCOV using R". Is there anyone who knows or has a good example of it? Thanks in advance. -- View this message in context: http://r.789695.n4.nabble.com

Re: [R] Problems with "pdf" device using "plot" "glht" function on "multcomp" library.

2010-09-14 Thread Kenneth Roy Cabrera Torres
Thank you Jorge Iván: Im working on a Linux platform, and with a recent pathed version of R. Does it work on windows? R version 2.11.1 Patched (2010-09-10 r52887) Platform: x86_64-unknown-linux-gnu (64-bit) locale: [1] LC_CTYPE=es_CO.UTF-8 LC_NUMERIC=C LC_TIME=es_CO.UTF-8 LC

Re: [R] Can I save my console contents automatically?

2010-09-14 Thread David Winsemius
On Sep 14, 2010, at 10:33 AM, Nobuaki Michihata wrote: Dear All, I found a following solution from "http://r.789695.n4.nabble.com/";. However this command can save only the result. Is there any good solution to save both commands themselves and the results. Thank you for your help. sink("Fi

[R] nlme numeric data format

2010-09-14 Thread ziggyvic
Dear R help folks I am trying to run nlme for the first time (currently without guidance of any textbooks), apologies if this is a bit simplistic. My model is 15 env predictors of diversity, grouped by 3 locations: mod1<-nlme(shan~Alt+EC+Phos+pH+DOC+NO3NO2+H2O+Amino+NH4+Birds+Plants+Seals+Human

[R] Problems with "pdf" device using "plot" "glht" function on "multcomp" library.

2010-09-14 Thread Kenneth Roy Cabrera Torres
Hi R users: I have de following data frame (called "Sx") Descripcion Nitratos Cont85g72.40 Cont85g 100.50 Cont85g 138.30 Cont80g 178.33 Cont80g79.01 Cont80g74.16 Cont75g

Re: [R] Sweave and Miktex (Sweave.sty not found)

2010-09-14 Thread Duncan Murdoch
On 14/09/2010 11:51 AM, Katie Surrence wrote: Thanks Duncan -- I'm running R 2.11 and ??texify gets me no recognition. There is a command by that name in the tools package (not loaded by default, so that's why help didn't work), but I was talking about entering it at the command prompt, as y

Re: [R] xyplot axis line width

2010-09-14 Thread array chip
Thank you Deepayan. This is exactly what I needed. John - Original Message From: Deepayan Sarkar To: array chip Cc: r-help@r-project.org Sent: Tue, September 14, 2010 4:52:29 AM Subject: Re: [R] xyplot axis line width On Tue, Sep 14, 2010 at 4:26 AM, array chip wrote: > Hi, another

[R] predict(backSpline(x)): losing my marbles?

2010-09-14 Thread Ben Bolker
I'm sure I'm doing something completely boneheaded here, but I've used this idiom (constructing an interpolation spline and using prediction from a backSpline to find an approximation profile confidence interval) many times before and haven't hit this particular problem: r2 <- c(1.04409027570

Re: [R] TimeStamp

2010-09-14 Thread Roberto Badilla Fuentes
Thanks. Both methods definitely help. -Roberto 2010/9/14 Uwe Ligges > > > On 06.09.2010 03:51, Roberto Badilla Fuentes wrote: > >> Hi, >> >> I have a dataset in .dbf format. It contains Coordinates and Time. >> The TIMESTAMP is as follows: >> >> 03/18/2006 13:30:37 >> I am not working with t

Re: [R] proportion

2010-09-14 Thread Greg Snow
Learn to use functions like help.search, RSiteSearch, or the sos package, these tools will help you answer your own questions like this. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help

[R] ASA John M. Chambers Statistical Software Award - 2011

2010-09-14 Thread Fei Chen
John M. Chambers Statistical Software Award - 2011 Statistical Computing Section American Statistical Association The Statistical Computing Section of the American Statistical Association announces the competition for the John M. Chambers Statistical Software Award. In 1998 the Association for C

Re: [R] Sweave and Miktex (Sweave.sty not found)

2010-09-14 Thread Katie Surrence
Thank you very much, Dennis. That worked. I had tried pointing the list of Roots to the R directory where the Sweave file was originally located, and had gotten an error, but I had not tried making my own directory. On Tue, Sep 14, 2010 at 9:08 AM, Dennis Murphy wrote: > Hi: > > Start here: >

[R] Model averaging with (and without) interaction terms

2010-09-14 Thread Leslie Young
I’ve used logistic regression to create models to assess the effect of 3 variables on the presence or absence of a species, including the interaction terms between variables and model averaging using MuMI: model.avg The top models (delta<4) include several models with interaction terms and some mo

Re: [R] R2WinBugs problem

2010-09-14 Thread Uwe Ligges
If the exactly same code runs on one machine and not on another where R version, script, model file, inits, data etc. are all identical, then I suspect you have different versions of R2WinBUGS installed. Please check is really all files and all version numbers are the same. If you still have

Re: [R] Multiple CPU HowTo in Linux?

2010-09-14 Thread Christian Raschke
Edwin, I'm not sure what you mean by "adapting"; other than installing multicore, there is nothing else to set up. How and whether you could then parallelise your code strongly depends on the specific problem you are facing. What have done in the past was to look at the source of the functio

Re: [R] Problem with cat() == A related question

2010-09-14 Thread jim holtman
Try the following: fn1 <- function(n = 5){ mat <- matrix(rnorm(5*5), 5, 5) cat(print(mat)) invisible(NULL)} On Tue, Sep 14, 2010 at 9:59 AM, Peng, C wrote: > > Code: > >> fn1 <- function(n = 5){ > +  mat <- matrix(rnorm(5*5), 5, 5) > +  cat(print(mat)) > + } >> fn1() >           [,1]      

Re: [R] Error: cannot allocate vector of size X.0 Mb

2010-09-14 Thread Marc Schwartz
On Sep 14, 2010, at 9:47 AM, John1983 wrote: > > Yes I see. > So I typed as you mentioned and I get an 8 (therefore this is a 64-bit R). > > Is there anything else I need to check to remove this error? 1. Add more RAM. 2. Depending upon what you are doing relative to data management/analysis

Re: [R] Error: cannot allocate vector of size X.0 Mb

2010-09-14 Thread Uwe Ligges
On 14.09.2010 16:47, John1983 wrote: Yes I see. So I typed as you mentioned and I get an 8 (therefore this is a 64-bit R). Is there anything else I need to check to remove this error? Yes: If the amount of RAM in your machine is sufficient Best, Uwe ___

Re: [R] Can I save my console contents automatically?

2010-09-14 Thread Nobuaki Michihata
Dear All, I found a following solution from "http://r.789695.n4.nabble.com/";. However this command can save only the result. Is there any good solution to save both commands themselves and the results. Thank you for your help. sink("Filename_here.log", type=c("output","message"), split=TRUE) # P

[R] ASA Stat. Computing & Stat. Graphics Student Paper Competition 2011

2010-09-14 Thread Fei Chen
Statistical Computing and Statistical Graphics Sections American Statistical Association Student Paper Competition 2011 The Statistical Computing and Statistical Graphics Sections of the ASA are co-sponsoring a student paper competition on the topics of Statistical Computing and Statistical Grap

Re: [R] Error: cannot allocate vector of size X.0 Mb

2010-09-14 Thread John1983
Yes I see. So I typed as you mentioned and I get an 8 (therefore this is a 64-bit R). Is there anything else I need to check to remove this error? -- View this message in context: http://r.789695.n4.nabble.com/Error-cannot-allocate-vector-of-size-X-0-Mb-tp2539031p2539078.html Sent from the R h

Re: [R] how to compute when row length is different

2010-09-14 Thread Jeff Newmiller
You need to line up the rows before you do the arithmetic. Check out ?merge "rasanpreet" wrote: > >hi guys..please help me with this >i am working on two data frames >one goes like this: >DF1 >Sample_id RepairHours Denatured Dose ZeroMean FourtyFiveMean NinetyMean >1 SDM071 0

Re: [R] Multiple CPU HowTo in Linux?

2010-09-14 Thread Edwin Groot
Hello Cedrick, Ah, yes, that looks like it would apply to my situation. I was previously reading on snow, which is tailored for clusters, rather than a single desktop computer. Anyone with experience adapting multicore to an R-script? I have to admit I know little about parallel processing, multipr

Re: [R] Sweave and Miktex (Sweave.sty not found)

2010-09-14 Thread Duncan Murdoch
On 14/09/2010 10:27 AM, Greg Johnson wrote: Katie Surrence gmail.com> writes: ... > I've copied the Sweave.sty file into at this point multiple places on the > Miktex path, including folders where I can see that it is looking for, and > successfully finding, sty files (e.g. Miktex 2.8/tex

Re: [R] Sweave and Miktex (Sweave.sty not found)

2010-09-14 Thread Duncan Murdoch
On 14/09/2010 8:56 AM, Katie Surrence wrote: Hi all, I know from googling that this is a common problem; I've just tried what I understand to be the common solutions to know avail -- maybe I'm just confused. I installed Miktex 2.8 -- it seems to be working fine. I'm using this demo document

Re: [R] Sweave and Miktex (Sweave.sty not found)

2010-09-14 Thread Greg Johnson
Katie Surrence gmail.com> writes: ... > I've copied the Sweave.sty file into at this point multiple places on the > Miktex path, including folders where I can see that it is looking for, and > successfully finding, sty files (e.g. Miktex 2.8/tex/latex/base). I also > went to the Miktex setting

Re: [R] Error: cannot allocate vector of size X.0 Mb

2010-09-14 Thread Marc Schwartz
On Sep 14, 2010, at 9:09 AM, John1983 wrote: > > Hi, > > I am working with a file (900MB in size) that has around 10 million records > (in particular FASTQ records). > I am able to read in the file as an object of BStringSet. When I start to > manipulate the data, after almost 4 hours, I get the

Re: [R] Multiple CPU HowTo in Linux?

2010-09-14 Thread Johnson, Cedrick W.
?multicore perhaps On 09/14/2010 10:01 AM, Edwin Groot wrote: Hello all, I upgraded my R workstation, and to my dismay, only one core appears to be used during intensive computation of a bioconductor function. What I have now is two dual-core Xeon 5160 CPUs and 10 GB RAM. When I fully load it,

[R] Error: cannot allocate vector of size X.0 Mb

2010-09-14 Thread John1983
Hi, I am working with a file (900MB in size) that has around 10 million records (in particular FASTQ records). I am able to read in the file as an object of BStringSet. When I start to manipulate the data, after almost 4 hours, I get the error message as Error: cannot allocate vector of size X.0

Re: [R] Sweave and Miktex (Sweave.sty not found)

2010-09-14 Thread Dennis Murphy
Hi: Start here: http://docs.miktex.org/manual/localadditions.html#id573835 I have a LocalTeXfiles directory under my home directory on Windows 7, with nested folders for tex -> latex -> Sweave. All of my Sweave files (*.fd, *.cfg, *.sty) are in the Sweave directory. The manual linked above shows

[R] Multiple CPU HowTo in Linux?

2010-09-14 Thread Edwin Groot
Hello all, I upgraded my R workstation, and to my dismay, only one core appears to be used during intensive computation of a bioconductor function. What I have now is two dual-core Xeon 5160 CPUs and 10 GB RAM. When I fully load it, top reports about 25% user, 75% idle and 0.98 short-term load. The

Re: [R] how to compute when row length is different

2010-09-14 Thread Dennis Murphy
Hi: Just to be different, here's a data.table solution: library(data.table) # It's always a good idea to have your merge key variables match in each data frame/table names(DF1)[1] <- 'SampleId' dt1 <- data.table(DF1, key = 'SampleId, RepairHours') dt2 <- data.table(DF2, key = 'SampleId, RepairHo

Re: [R] Problem with cat() == A related question

2010-09-14 Thread Peng, C
Code: > fn1 <- function(n = 5){ + mat <- matrix(rnorm(5*5), 5, 5) + cat(print(mat)) + } > fn1() [,1][,2] [,3][,4] [,5] [1,] -0.7101952 0.78992424 -0.8310871 2.49560703 -0.9543827 [2,] -0.1425682 -2.69186367 -0.5937949 0.03188572 -0.5512154 [3,] -0.

Re: [R] Object oriented programming in R.

2010-09-14 Thread jim holtman
I think this is what you want. Notice the use of 'list' in the rep to create a list of list: > fred <- list(happy = 1:10, name = "squash") > x <- rep(list(fred), 5) > str(x) List of 5 $ :List of 2 ..$ happy: int [1:10] 1 2 3 4 5 6 7 8 9 10 ..$ name : chr "squash" $ :List of 2 ..$ happy: i

Re: [R] Object oriented programming in R.

2010-09-14 Thread David Winsemius
On Sep 14, 2010, at 9:29 AM, Alaios wrote: I would like to thank you very much all that you helped me so far. So I tried to check how the following works fred <- list(happy = 1:10, name = "squash") rep(fred, 5) This returns the following : fred[1] $happy [1] 1 2 3 4 5 6 7 8 9 10

[R] biclust - jaccardind

2010-09-14 Thread James Nead
Hi, I looked at the help documentation, but couldn't find the algorithm for calculating the modified jaccard index for separate sets of biclusters. Is there a link to some documentation on this? many thanks! [[alternative HTML version deleted]] __

Re: [R] NA confusion (length question)

2010-09-14 Thread Joshua Wiley
You're quite welcome. If you've a hankering to learn more you can see the documentation for ?residuals.lm (note the .lm addition, which designates the particular method that gets dispatched since your object class was "lm"). For even more fun: ?naresid (which residuals() calls) and to see how it

Re: [R] Object oriented programming in R.

2010-09-14 Thread Alaios
I would like to thank you very much all that you helped me so far. So I tried to check how the following works fred <- list(happy = 1:10, name = "squash") rep(fred, 5) This returns the following : > fred[1] $happy [1] 1 2 3 4 5 6 7 8 9 10 > fred[2] $name [1] "squash" What I am tryin

Re: [R] Unable to do a post hoc test after Friedman's

2010-09-14 Thread David Winsemius
On Sep 14, 2010, at 7:07 AM, shivanair wrote: I have R version 2.11.1 I am able to run a Friedman.test, but cant do further post.hoc test. Tried running "friedman.test.with.post.hoc"etc It comes with "Error: object 'friedman.test.with.post.hoc' not found" This is after loading the packages

Re: [R] NA confusion (length question)

2010-09-14 Thread Stratford, Jeffrey
Josh, I am raising my cup of coffee to you - that worked perfectly. Cheers and thanks again! -Original Message- From: Joshua Wiley [mailto:jwiley.ps...@gmail.com] Sent: Tuesday, September 14, 2010 9:29 AM To: Stratford, Jeffrey Cc: r-help@r-project.org Subject: Re: [R] NA confusion

  1   2   >