[R] Strange behavior of 2-d array within function

2021-10-06 Thread Gabriel Toro
Hi, I have a function, which defines an array of dimensions 5000 by 60, calculates the values within that array and then returns the array on exit. I get an error: Error in my_simulated[ir, 1:it] : incorrect number of dimensions For some strange reason, the array is somehow being changed from

[R] Crashes while pasting a graphic to clipboard on Windows

2021-06-21 Thread Gabriel Toro
I am using version 3.6.3 on Windows. I recently noticed that R crashes when pasting graphics to the clipboard (both as metafiles and as images). I saw some old (~ 2 years old) references to the problem on Google, but no recent ones. Is there a way around this problem? Thanks, Gabriel

[R] Question about .Rhistory in Windows

2021-06-21 Thread Gabriel Toro
I am using version 3.6.3 on Windows. For some reason, the .Rhistory file gets over-written once in a while. I would like to avoid this so I have a complete history over multiple R sessions. Under what conditions can the .Rhistory file be over-written? Is there a way to keep this file from

[R] FW: Two-line title in R legend

2012-11-11 Thread Gabriel Toro
Hi, I am trying to use a legend title that is a bit too long for one line. To try to break the title in two lines, I am using legend (title=Top of Title\nbottom of title, etc. ) R prints the title as two lines, but the top line is outside the legend box. How can I trick the R legend