[R] differential use of R version

2017-04-04 Thread Bogdan Tanasa
Dear all, please could you advise me on the following : on a server, in a folder "x86_64-redhat-linux-gnu-library", i have 2 versions of R (below), with the corresponding BioC libraries : > 3.2 > 3.3 how could i preferentially use an R version or the other (with the related BioC libraries) ?

Re: [R] R hangs on startup

2017-04-04 Thread Jeff Newmiller
> Windows can occasionally be flaky > about multiple instances of a single > program. John... I run multiple instances of R and RStudio on Win7 regularly. About the only poor behaviour I encounter has to do with updating packages used by those other instances. However, I would never run R as

Re: [R] R hangs on startup

2017-04-04 Thread William Dunlap via R-help
Does R work if started with the --vanilla flag? (Add it after ...\Rgui.exe in the Target line of the Windows shortcut or on the command line.) Bill Dunlap TIBCO Software wdunlap tibco.com On Tue, Apr 4, 2017 at 1:53 PM, John wrote: > On Mon, 3 Apr 2017 18:06:06 +0100 >

Re: [R] R hangs on startup

2017-04-04 Thread John
On Mon, 3 Apr 2017 18:06:06 +0100 "Vineet Gupta" wrote: > John, > > R does not work properly, outside of RStudio. > > Vineet > That is what I thought you might be saying. Does it work outside if RStudio is not loaded? Windows can occasionally be flaky about

Re: [R] Using R and Python together

2017-04-04 Thread Kankana Shukla
Installation of pyper gives me error code 1. I used pip install on my ubuntu machine. How to install Pyper correctly? Here is the debug log file: /usr/bin/pip run on Tue Apr 4 15:07:58 2017 Downloading/unpacking pyper Getting page

Re: [R] taking a small piece of large tiff

2017-04-04 Thread jim holtman
How big is 'large'? Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you want to do, not how you want to do it. On Tue, Apr 4, 2017 at 7:47 AM, Louisa Reynolds via R-help wrote: > Dear Forum > I am trying to cut out a small

[R] taking a small piece of large tiff

2017-04-04 Thread Louisa Reynolds via R-help
Dear Forum  I am trying to cut out a small section of a very large 2-dimensional grayscale image as a tiff in R, but it is having difficulty handling such large files.  I have looked at bigmemory and ff packages but it is unclear how I can use these packages with tiffs. Can anyone please

Re: [R] system call removes special characters from text output

2017-04-04 Thread Bert Gunter
... and perhaps worth noting (again) is that one of the benefits of producing a repro ex is that it often reveals such bugs to the prospective poster, thus obviating the need to post. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking

Re: [R] system call removes special characters from text output

2017-04-04 Thread stephen sefick
Hello everyone, Again, I apologize for not providing a reproducible example. There was a small (but important) bug in my R code having nothing to do with system(), this is now fixed, and everything is working as expected this morning. The lesson for me is time to stop coding after 10 PM. Thank

Re: [R] system call removes special characters from text output

2017-04-04 Thread Boris Steipe
The "whatever information" would be the usual minimal reproducible example. Since you think your code works at the shell level, make up an example with a system call to "echo". Then state what you expect to happen and what happens instead. B. > On Apr 4, 2017, at 12:44 AM, stephen sefick

Re: [R] R function stopped working

2017-04-04 Thread Jeff Newmiller
Daniel, if you wish to learn from your mistakes them you must listen. Peter is not someone whose input you should dismiss. The function you have showed us never worked as you have described it. However, if you give .GlobalEnv as the first argument in the call to ls() then it should work. You

Re: [R] R function stopped working

2017-04-04 Thread DANIEL PRECIADO
Thanks! I was not aware of the browser() function, seems pretty useful for debugging. However, for this particular case, adding it to the mentioned function doesn't do much: Again I get no errors, no output in the terminal and no files are created. If I include browser() within the for-loop

Re: [R] Converting date vector into a serial date number

2017-04-04 Thread Jeff Newmiller
I think it is important to point out that treating dates or times as serial numbers should only be done for importing or exporting data. Rather, once the conversion to one of the ?DateTimeClasses has occurred you are better off leaving it as such to reduce the brittleness of your code. For one

Re: [R] Converting date vector into a serial date number

2017-04-04 Thread Tunga Kantarcı
Marc, thank you for this excellent answer. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

Re: [R] Converting date vector into a serial date number

2017-04-04 Thread Bert Gunter
?strptime and ?paste (to combine your 2 date vector pieces) Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, Apr 4, 2017 at 6:51 AM, Tunga

Re: [R] Converting date vector into a serial date number

2017-04-04 Thread Marc Schwartz
> On Apr 4, 2017, at 8:51 AM, Tunga Kantarcı wrote: > > I have a data frame. One column (call this column a) contains years, > like 1871, and another column (call this column b) contains months, > like 2. I need to convert these year-month combinations, stored in >

Re: [R] R function stopped working

2017-04-04 Thread S Ellison
Maybe a daft question arising from lack of reproducible example, but have you run ls() manually to make sure there are objects that _exactly_ match "_Figs_" ? The simplest explanation for a loop doing nothing is that there are no cases. S Ellison > The following function is supposed to search

Re: [R] R function stopped working

2017-04-04 Thread Boris Steipe
I discourage the use of print() for debugging. Put a browser() statement into your loop and when execution takes you to the debugger interface, examine your variables and expressions one by one. B. > On Apr 4, 2017, at 10:09 AM, DANIEL PRECIADO wrote: > > To your

Re: [R] R function stopped working

2017-04-04 Thread DANIEL PRECIADO
To your first comment: Yes, the function used to work, and the loop inside it still does (as indicated in my first email). I wouldn't bother asking otherwise. To your second, no, specifying the environment in the ls() call doesn't help, the problem persist. On Tue, 2017-04-04 at 15:26 +0200,

[R] Converting date vector into a serial date number

2017-04-04 Thread Tunga Kantarcı
I have a data frame. One column (call this column a) contains years, like 1871, and another column (call this column b) contains months, like 2. I need to convert these year-month combinations, stored in these two date vectors, into a single serial date number. E.g. year 1871 and month 2, stored

Re: [R] R function stopped working

2017-04-04 Thread peter dalgaard
Given the following little experiment > foobar <- 1 > f <- function() ls() > f() character(0) > f <- function(x) ls() > f(2) [1] "x" > ... I am pretty sure that your code _never_ actually worked. It probably helps if you tell ls() which environment to list, as in: > f <- function()

Re: [R] R function stopped working

2017-04-04 Thread DANIEL PRECIADO
Thanks, but printing doesn't work within the function either. (i.e, no result or output, or error). Also, like I said, the loop is working fine on its own (so the path, name, filename, and all other variables called from the function exist, are available and are recognized just fine). It just

Re: [R] R function stopped working

2017-04-04 Thread peter dalgaard
How about inserting print() statements on the output of "ls()" and the value of "filename". In particular, is the value of Plots_path the same as last week? -pd > On 4 Apr 2017, at 10:50 , DANIEL PRECIADO wrote: > > The following function is supposed to search the

[R] R function stopped working

2017-04-04 Thread DANIEL PRECIADO
The following function is supposed to search the workspace and save plots  (i.e. listing all objects in the workspace named "Figs", which are all ggplot2 plots, and saving them as png files) SaveFigs <- function() { for (i in ls(pattern="_Figs_")) { filename =

Re: [R] matafor package - categorical moderator interpretation question

2017-04-04 Thread Viechtbauer Wolfgang (SP)
You are not conducting a proper test of the moderator. When you use 'mods = ~factor(sample_data$Participants) - 1', the model does not include an intercept term but dummy variables corresponding to all levels of the moderator. The omnibus test you are getting therefore tests the null hypothesis