Re: [R] Memory hungry routines

2014-12-29 Thread Henrik Bengtsson
On Mon, Dec 29, 2014 at 10:52 AM, ALBERTO VIEIRA FERREIRA MONTEIRO wrote: > Is there any way to detect which calls are consuming memory? > > I run a program whose global variables take up about 50 Megabytes of > memory, but when I monitor the progress of the program it seems to > allocating 150 Me

Re: [R] Memory hungry routines

2014-12-29 Thread Hadley Wickham
You might find the advice at http://adv-r.had.co.nz/memory.html helpful. Hadley On Tue, Dec 30, 2014 at 7:52 AM, ALBERTO VIEIRA FERREIRA MONTEIRO wrote: > Is there any way to detect which calls are consuming memory? > > I run a program whose global variables take up about 50 Megabytes of > memory

Re: [R] fuction to find outlier

2014-12-29 Thread Greg Snow
Pushpa, To extend John Fox's answer a little. Look at the "outliers" dataset in the TeachingDemos package, see "?outliers" and run the examples on that help page. Then ask yourself if you are comfortable with the automatic outlier removal shown in the example. On Mon, Dec 29, 2014 at 12:39 PM,

Re: [R] Installation Help

2014-12-29 Thread Jeff Newmiller
Let windows prompt you for your password when it is needed... don't run anything as Administrator directly unless you are prepared to fix the problems that occur. --- Jeff NewmillerThe .

Re: [R] Installation Help

2014-12-29 Thread Bros
I guess I skipped an option during installation. I removed the program now. Do u think I should choose something else than administrator? From: emorway [via R] [mailto:ml-node+s789695n4701164...@n4.nabble.com] Sent: Monday, December 29, 2014 12:13 AM To: Bros Subject: Re: Installation Help

Re: [R] fuction to find outlier

2014-12-29 Thread John Fox
Dear Pushpa Methekar, This apparently uses the outlierTest() function in the car package. I'm afraid that I find your code incomprehensible and there's not enough information here to reproduce what you've done. You're looping over the index i in 1:10, explicitly incrementing the loop index at the

Re: [R] Memory hungry routines

2014-12-29 Thread Duncan Murdoch
On 29/12/2014 1:52 PM, ALBERTO VIEIRA FERREIRA MONTEIRO wrote: > Is there any way to detect which calls are consuming memory? The Rprofmem() function can do this, but you need to build R to enable it.Rprof() does a more limited version of the same thing if run with memory.profiling = TRUE. Du

Re: [R] Difference between eigs() and eigen()

2014-12-29 Thread Uwe Ligges
eigs() is from a contributed package. No idea what it is about, but my guess is these are actually numerical differences coming from different algorithms used to calculate the eigenvalues. For details, please ask the author of the corresponding contributed package. Best, Uwe Ligges On 29.12.2

[R] Memory hungry routines

2014-12-29 Thread ALBERTO VIEIRA FERREIRA MONTEIRO
Is there any way to detect which calls are consuming memory? I run a program whose global variables take up about 50 Megabytes of memory, but when I monitor the progress of the program it seems to allocating 150 Megabytes of memory, with peaks of up to 2 Gigabytes. I know that the global variable

[R] Difference between eigs() and eigen()

2014-12-29 Thread Pierrick Bruneau
Dear R users and contributors, I recently observed a difference between the outputs of the classic eigen() function, and the Arnoldi variant eigs() that extracts only the few first eigenpairs. Here is some sample code illustrating the problem: library(rARPACK) library(speccalt) set.seed(1) # com

[R] fuction to find outlier

2014-12-29 Thread Methekar, Pushpa (GE Transportation, Non-GE)
Hi all, I am stuck on outlier, while doing regression analysis. I done up to modelling ,I got lm model for each y and x. Now I want to find out outlier in that models. How do I find out outlier and remove them. for(i in 1:10){ t1=print(outlierTest(fitted.modely1.temp.l ,cutoff=0.05, n.max=1, or

[R] Some questions on R

2014-12-29 Thread Suzuki Kenta
To whom it may concern My name is Kenta Suzuki. Today I subscribed the R-help. I do not know about this R-help in detail but I send this e-mail since I have some trouble on programming R. When I type help() in general id dose not work properly. For instance, when I type, help("plot") in R, it sh

[R] Add labels to my geom_hlines...

2014-12-29 Thread Levent TERLEMEZ
Dear Users, Would you pls help me to write a proper geom_text addition to geom_hline of my ggplot2. This is d.oran Tarih EUROUSD USDJPY EUROJPY 1 2005-01-01 1.378200 1.034654 1.425960 2 2005-01-02 1.373217 1.027268 1.410662 3 2005-01-03 1.364489 1.024884 1.398443 4 2005-01-04 1.35276

Re: [R] attribute and main value

2014-12-29 Thread Gerrit Draisma
Thanks Bill, That is what I was looking for. Gerrit On 12/29/2014 05:53 PM, William Dunlap wrote: as.vector(x) will return x without any attributes and structure(x, attrA=NULL, attrB=NULL) will return x without the named attributes. > z <- f(1:3, 4) > z [1] 14 attr(,"gradient")

Re: [R] attribute and main value

2014-12-29 Thread William Dunlap
as.vector(x) will return x without any attributes and structure(x, attrA=NULL, attrB=NULL) will return x without the named attributes. > z <- f(1:3, 4) > z [1] 14 attr(,"gradient") [1] -6 -4 -2 > as.vector(z) [1] 14 > structure(z, gradient=NULL) [1] 14 as.vector is a gen

Re: [R] attribute and main value

2014-12-29 Thread Gerrit Draisma
Thanks Duncan. But my question was how to extract simply the function value from value, without the gradient attribute? I see that things like value<2 give the right answer. I was curiosity. I found now that value[1] gives strips the attributes from value: -- > value [1] 1 attr(,"gradient")

Re: [R] attribute and main value

2014-12-29 Thread Duncan Murdoch
On 29/12/2014 10:32 AM, Gerrit Draisma wrote: > Just a curiosity question: > > In the documentation for the nlm procedure > a find this example of defining a function > with a gradient attribute: > --- > f <- function(x, a) > { > res <- sum((x-a)^2) > attr(r

Re: [R] half-logistic distribution

2014-12-29 Thread Ben Bolker
Therneau, Terry M., Ph.D. mayo.edu> writes: > > > On 12/26/2014 05:00 AM, r-help-request r-project.org wrote: > > i want to analyse survival data using typeI HALF LOGISTIC > > DISTRIBUTION.how can i go about it?it installed one on R in the > > survival package didn't include the distribution..

[R] attribute and main value

2014-12-29 Thread Gerrit Draisma
Just a curiosity question: In the documentation for the nlm procedure a find this example of defining a function with a gradient attribute: --- f <- function(x, a) { res <- sum((x-a)^2) attr(res, "gradient") <- 2*(x-a) res } --- I get the

Re: [R] Getting HR from Cox model in R

2014-12-29 Thread Michael Dewey
Comments in line On 24/12/2014 22:09, Ruzan Udumyan wrote: Dear Michael, Thank you very much for your reply. The more complete information is as follows: I want to do a mediation analysis following the below-mentioned syntax from: http://www.biomedcentral.com/content/supplementary/1471-2288-14

Re: [R] RAxML using R

2014-12-29 Thread Ista Zahn
Let's step back for a moment and look at the larger picture. There are real advantages to using packages on CRAN, including convenient installation, updates, etc., so let's see if we can find a package on cran that does what we want: install.packages("sos") library(sos) findFn("raxml") This sugge

Re: [R] RAxML using R

2014-12-29 Thread Luigi Marongiu
Dear Rui, thanks for the reply. I tried it but there were serious problems with the function itself: I can't use it as is because there were different error messages according to the parameters passed to it. Such function has to be re-written on purpose or I should call the RAxML function from

Re: [R] Legend (guides) for point and two line graph

2014-12-29 Thread Ista Zahn
Hi David, 1) set size to a fixed value instead of mapping it to a constant, i.e., geom_line(size = 2) instead of geom_line(aes(size = 2)) 2) perhaps ggplot(rtest, aes(x=Time, y=Calculated,color=Model, group=Model)) + geom_line(size = 2) + geom_point(aes(y=Observed, shape=""), si

Re: [R] half-logistic distribution

2014-12-29 Thread Therneau, Terry M., Ph.D.
On 12/26/2014 05:00 AM, r-help-requ...@r-project.org wrote: i want to analyse survival data using typeI HALF LOGISTIC DISTRIBUTION.how can i go about it?it installed one on R in the survival package didn't include the distribution...or i need a code to use maximum likelihood to estimate the par

Re: [R] RAxML using R

2014-12-29 Thread Rui Barradas
Hello, You can put the code of that function in a separate file, say "raxml.R" and then use source("raxml.R"). See the help page ?source. Hope this helps, Rui Barradas Em 28-12-2014 23:09, Luigi Marongiu escreveu: Dear all, I would like to run RAxML for phylogenetic analysis as indicated on

Re: [R] Changing UTC time to a time zone different from system time zone

2014-12-29 Thread Prof Brian Ripley
On 28/12/2014 21:52, Jeff Newmiller wrote: Very few attachment file types are allowed through the mailing list, and yours did not make it. I noticed that your format strings did not appear consistent... see the format string I use below, and make sure the characters between the numeric parts of