[R] Inconsistent error opening connection on URL

2017-02-09 Thread Ryan Utz
Hello, I'm trying to automatically download online data using a URL. Half the time the code works, the other time I get this error: Error in file(con, "r") : cannot open the connection But I cannot for the life of me figure out why it works sometimes and not others. Reading online data is relati

[R] How to prepare a input data for Cytoscape

2017-02-09 Thread Elham - via R-help
Hello,I want to use "Cytoscape"  to construct co-expression network for coding-lncoding (control/tretment situation).I calculated correlation by R for control and treatment and now I want to prepare input data for cytoscape,  I want molecules (genes and lncRNA) as nodes andcorrelation weighting t

Re: [R] How to include custom na.action in function

2017-02-09 Thread Bert Gunter
Oh, after seeing John's answer, I realized I misread your x*(-1) bit as x-1. His reply is how it should be done. The sillier ifelse() solution is: ifelse(x>0,-x,abs(x) ) My remark about going through a tutorial are still germane, however. -- Bert Bert Gunter "The trouble with having an open m

Re: [R] How to include custom na.action in function

2017-02-09 Thread Bert Gunter
Do Not do this! ?ifelse ## (is vectorized; or use subscripting) > x <- c(NA,5,0,-3) > ifelse(x>0,x-1, abs(x)) [1] NA 4 0 3 Please spend some time with an R tutorial or two -- there are many good ones on the web. This is basic stuff covered in them. Cheers, Bert Bert Gunter "The troubl

Re: [R] How to include custom na.action in function

2017-02-09 Thread Jim Lemon
Hi Alejandro, How about: -sign(x) * sign(x) * x Jim On Fri, Feb 10, 2017 at 6:30 AM, Alejandro wrote: > Hello, > > I’ve tried googling for an answer to this but I simply can’t find something > that fixes my problem. I have a long numerical vector with positive, negative > and null values. I

Re: [R] How to include custom na.action in function

2017-02-09 Thread Fox, John
Dear Alejandro, If I follow what you want to do, you can just negate the vector: > x <- c(-10, 0, 10, NA) > (x <- -x) [1] 10 0 -10 NA I hope this helps, John - John Fox, Professor McMaster University Hamilton, Ontario, Canada Web: http://socserv.mcmaste

[R] How to include custom na.action in function

2017-02-09 Thread Alejandro
Hello, I’ve tried googling for an answer to this but I simply can’t find something that fixes my problem. I have a long numerical vector with positive, negative and null values. I want to revert the sign of the positive and negative values and for zero to remain zero. I’ve written a function th

Re: [R] RStudio: Place for Storing Options

2017-02-09 Thread Martin Maechler
> Ulrik Stervbo > on Thu, 9 Feb 2017 14:37:57 + writes: > Hi Georg, > maybe someone here knows, but I think you are more likely to get answers to > Rstudio related questions with RStudio support: > https://support.rstudio.com/hc/en-us > Best, > Ulrik In

Re: [R] RStudio: Place for Storing Options

2017-02-09 Thread Ulrik Stervbo
Hi Georg, maybe someone here knows, but I think you are more likely to get answers to Rstudio related questions with RStudio support: https://support.rstudio.com/hc/en-us Best, Ulrik On Thu, 9 Feb 2017 at 12:35 wrote: > Hi All, > > I would like to make a backup of my RStudio IDE options I conf

Re: [R] rms::latex.anova broken?

2017-02-09 Thread Kevin E. Thorpe
I figured I should follow-up to say the function is not broken, rather it was me not paying close attention to recent release notes. Frank Harrell kindly informed me (thanks Frank) that with recent versions of Hmisc/rms I should use options(prType="latex") for LaTeX output to behave correctly.

[R] RStudio: Place for Storing Options

2017-02-09 Thread G . Maubach
Hi All, I would like to make a backup of my RStudio IDE options I configure using "Tools/Global Options" from the menu bar. Searching the web did not reveal anything. Can you tell me where RStudio IDE does store its configuration? Kind regards Georg [[alternative HTML version delete

[R] [R-pkgs] Announcing mfe 0.1.0

2017-02-09 Thread Luís Paulo F . Garcia
Dear R users, I am pleased to announce that the package mfe (Meta-Feature Extractor) is now available on CRAN (https://cran.r-project.org/package=mfe). The mfe package extracts meta-features from datasets to support the design of recommendation systems based on Meta-Learning. The meta-features, a