Re: [R] Trying to understand the magic of lm (Still trying)

2019-05-10 Thread David Winsemius
On 5/10/19 12:53 PM, Sorkin, John wrote: A number of people have helped me in my mission to understand how lm (and other fucntions) are able to pass a dataframe and then refer to a specific column in the dataframe. I thank everyone who has responded. I now know a bit about deparse(substitute

Re: [R] saving an R script

2019-05-10 Thread Göran Broström
?dump Den 2019-05-10 kl. 04:54, skrev David Winters: Greetings, This is a super embarrassing question. But, how do you save an R script with code? that is, not doing it the cheat way? where you just hit the "save" button? what function would it be? I know how to save the environment in code:

[R] Trying to understand the magic of lm (Still trying)

2019-05-10 Thread Sorkin, John
A number of people have helped me in my mission to understand how lm (and other fucntions) are able to pass a dataframe and then refer to a specific column in the dataframe. I thank everyone who has responded. I now know a bit about deparse(substitute(xx)), but I still don't fully understand how

Re: [R] saving an R script

2019-05-10 Thread Boris Steipe
If the script is originally in a file. I use ... myScript <- readLines() # [...] modify the myScript vector writeLines(myScript, con = ) If this is not what you mean, perhaps you can describe your intended workflow more explicitly. Cheers, B. > On 2019-05-10, at 09:42, Robert Baer wrote: >

Re: [R] R 3.4.4 is released

2019-05-10 Thread Hasan Diwan
Congrats to the team! -- H On Thu, 18 Apr 2019 at 08:35, Michael Dewey wrote: > Dear Stephen > > Questions about RStudio ae best asked in their help forums but I would > definitely install the latest version of R and RStudio and do > update.packages before asking > > Michael > > On 18/04/2019 13

Re: [R] saving an R script

2019-05-10 Thread Jeff Newmiller
Don't. Not from within R. Edit your script in a text editor, and save it using the usual method for that editor. You can copy lines from that file and paste them into the R console to confirm that each part of your script works, or save it regularly and use the source function from within the R

Re: [R] convert microns to nm in a messy dataset

2019-05-10 Thread John McKown
This is my approach. It is based entirely on what you said (multiply by 1000 to convert from nm to µm, but I think it is divide by). It assumes that the starting value is in µm. If the starting value is in nm, change the "factor=1" to "factor=1000". That µm is micro-meters (10^-6) and nm is nano-me

Re: [R] saving an R script

2019-05-10 Thread Robert Baer
I agree that an editor or a development environment like RStudio is the best answer, but perhaps savehistory() function is what you are looking for. On 5/10/2019 8:32 AM, Doran, Harold wrote: David Most of us use an editor of some kind to write our code. I use Notepad++ but there are many opt

Re: [R] saving an R script

2019-05-10 Thread Doran, Harold
David Most of us use an editor of some kind to write our code. I use Notepad++ but there are many options. In this way, you simply write your code in a text file and save it. Some editors allow for you to execute your code from the script. -Original Message- From: R-help On Behalf Of

Re: [R] convert microns to nm in a messy dataset

2019-05-10 Thread peter dalgaard
>From nm to micron, _divide_ by 1000 (as you likely know) What are the units of the first value? Looks like micron in your example, but is there a rule? Basically, it is a "last observation carried forward" type problem, so something like this: my.data <- structure(list(V1 = c("2019/05/10

[R] saving an R script

2019-05-10 Thread David Winters
Greetings, This is a super embarrassing question. But, how do you save an R script with code? that is, not doing it the cheat way? where you just hit the "save" button? what function would it be? I know how to save the environment in code: save.image(file='myEnvironment.RData') quit(save='no') l

[R] convert microns to nm in a messy dataset

2019-05-10 Thread Ivan Calandra
Dear useRs, Below is a sample of my dataset (I have more rows and columns). As you can see in the 2nd column, there are values, the name of the parameter ('Sq' in that case), some integer ('45' in that case) and the unit ('µm' or 'nm'). I know how to extract the rows of interest (those with value

Re: [R] Rd files with duplicated alias 'plot'

2019-05-10 Thread Jeff Newmiller via R-help
a) Wrong list. Read the Posting Guide. b) Don't use @aliases for this purpose. c) Just use @export... plot already has a dispatch function. d) Best for you to be clear (don't assume everyone will know what you are talking about) that this question is about a contributed package called roxygen2

[R] Rd files with duplicated alias 'plot'

2019-05-10 Thread Sigbert Klinke
Hi, in package I have for two S3 classes plot routines: plot.ABC and plot.DEF. For appearing both under ?plot I added in each file a "@aliases plot". This leads to the above warning message when calling devtools::check(). And only one of the routines appears under ?plot. Any hint how to so