[R] tapply and error bars: Problem Fixed

2018-06-24 Thread Ogbos Okike
HI Jim, This is great!! It is also tricky!!! The problem lies in the choice of ylim. And looking at the data and choosing ylim based on the maximum and minimum values of y is a waste of time. And choosing it by other means was yet much more difficult. I had to start plotting part of the data with

Re: [R] HLS and HSV in package colorspace [not whitepoint related]

2018-06-24 Thread Paul Murrell
Thanks Glenn. I also favour restricting to sRGB<->HSV/HLS top remove ambiguity (so there is no direct conversion RGB<->HSV/HLS). This would also be consistent with grDevices::rgb2hsv(). Paul On 23/06/18 13:43, Glenn Davis wrote: Achim and Paul, This is an entirely different subject - unrel

Re: [R] Outputting variable names and their value bindings

2018-06-24 Thread Simon Ellis
Hullo Jim, That's wonderful: thank you so much! That makes things even easier. There are also no problems regarding getting rid of the function as each set of computations occurs in a new Rstudio process: it's not optimal, but given the problem it was the best solution. My code will just stick thi

Re: [R] Outputting variable names and their value bindings

2018-06-24 Thread Simon Ellis
Thank you for your reply. At the moment, my colleague and her students are just using zero-dimensional variables for output, no vectors or matrices, which does make my life easier. Since my code-glue parses through the scripts' code to substitute variables as required, I could code a command to c

Re: [R] OT --- grammar.

2018-06-24 Thread Michael Sumner
No it isn't. Your stature is diminished by hateful behaviour. Cheers, Mike On Mon, 25 Jun 2018, 07:26 Rolf Turner, wrote: > On 25/06/18 12:03, Bert Gunter wrote: > > Ted, et. al.: > > > > Re: "Data is" vs "data are" ... Heh heh! > > > > "This is the kind of arrant pedantry up with which I will

Re: [R] Outputting variable names and their value bindings

2018-06-24 Thread Jim Lemon
Hi Simon, Easy to do if you call "print" directly: print<-function(x) cat(deparse(substitute(x)),"=\n",x,"\n") y<-3 print(y) y = 3 Obviously you will want to get rid of your print function when it is not being used with "rm" or by starting a new session. Getting it to bypass the default print me

Re: [R] OT --- grammar.

2018-06-24 Thread Rolf Turner
On 25/06/18 12:03, Bert Gunter wrote: Ted, et. al.: Re: "Data is" vs "data are" ... Heh heh! "This is the kind of arrant pedantry up with which I will not put." (Attributed to Churchill in one form or another, likely wrongly.) See here for some semi-authoritative dicussion: http://www.onlineg

Re: [R] OT --- grammar.

2018-06-24 Thread JRG
On 06/24/2018 08:03 PM, Bert Gunter wrote: > Ted, et. al.: > > Re: "Data is" vs "data are" ... Heh heh! > > "This is the kind of arrant pedantry up with which I will not put." > (Attributed to Churchill in one form or another, likely wrongly.) > > See here for some semi-authoritative dicussion

Re: [R] OT --- grammar.

2018-06-24 Thread Bert Gunter
Ted, et. al.: Re: "Data is" vs "data are" ... Heh heh! "This is the kind of arrant pedantry up with which I will not put." (Attributed to Churchill in one form or another, likely wrongly.) See here for some semi-authoritative dicussion: http://www.onlinegrammar.com.au/top-10-grammar-myths-data-

Re: [R] Outputting variable names and their value bindings

2018-06-24 Thread Jeff Newmiller
Yes [1], though most people use it interactively, e.g. ?cat ?sprintf [1] https://cran.r-project.org/manuals.html On June 24, 2018 4:31:40 PM PDT, Simon Ellis wrote: >Thank you for your reply. > >At the moment, my colleague and her students are just using >zero-dimensional variables for output,

Re: [R] OT --- grammar.

2018-06-24 Thread Ted Harding
On Mon, 2018-06-25 at 09:46 +1200, Rolf Turner wrote: > Does/should one say "the degrees of freedom is defined to be" or "the > degrees of freedom are defined to be"? > > Although value of "degrees of freedom" is a single number, the first > formulation sounds very odd to my ear. > > I would li

Re: [R] OT --- grammar.

2018-06-24 Thread JRG
(I suspect there will be much disagreement about "is" vs. "are".) I'd say something like "the parameter degrees of freedom is defined to be ..." ---JRG On 06/24/2018 05:46 PM, Rolf Turner wrote: > > Does/should one say "the degrees of freedom is defined to be" or "the > degrees of freedom are

Re: [R] OT --- grammar.

2018-06-24 Thread Peter Langfelder
I would use "the number of degrees of freedom is defined... ". Peter On Sun, Jun 24, 2018 at 2:46 PM Rolf Turner wrote: > > > Does/should one say "the degrees of freedom is defined to be" or "the > degrees of freedom are defined to be"? > > Although value of "degrees of freedom" is a single numbe

Re: [R] OT --- grammar.

2018-06-24 Thread Hasan Diwan
On Sun, 24 Jun 2018 at 14:46, Rolf Turner wrote: > > > Does/should one say "the degrees of freedom is defined to be" or "the > degrees of freedom are defined to be"? "are", the noun in your statement is "degrees", while the fragment "of freedom" acts as an adjective, narrowing the scope of the te

Re: [R] OT --- grammar.

2018-06-24 Thread Duncan Murdoch
On 24/06/2018 5:46 PM, Rolf Turner wrote: Does/should one say "the degrees of freedom is defined to be" or "the degrees of freedom are defined to be"? Although value of "degrees of freedom" is a single number, the first formulation sounds very odd to my ear. I would like to call upon the colle

[R] OT --- grammar.

2018-06-24 Thread Rolf Turner
Does/should one say "the degrees of freedom is defined to be" or "the degrees of freedom are defined to be"? Although value of "degrees of freedom" is a single number, the first formulation sounds very odd to my ear. I would like to call upon the collective wisdom of the R community to he

Re: [R] tapply and error bars

2018-06-24 Thread Jim Lemon
Hi Ogbos, The problem is almost certainly with the data. I get the plot I expect with the sample data that you first posted, so I know that the code works. If you try thIs what do you get? oodf<-read.table(text="S/N AB 1-5 64833 2-4 95864 3-3 82322 4-2 95591 5-

Re: [R] Outputting variable names and their value bindings

2018-06-24 Thread Jeff Newmiller
Yes and no. R does not have a "Matlab-output-compatibility" mode, but you can write your script to output anything you want it to using the "cat" function with various functions like "sprintf" and "as.character". You may want to write some functions that format some common objects that you typic

Re: [R] parallel computing in r....

2018-06-24 Thread Jeff Newmiller
You cannot send one task to 12 processors... the price of parallelism is that you must break down your task into smaller tasks. Once you have number of tasks equal to our more than the number of available cores then the higher level functions such as parLapply or mclapply can shuffle tasks onto

[R] Outputting variable names and their value bindings

2018-06-24 Thread Simon Ellis
Hullo, I'm writing a piece of scripting glue for a colleague who is doing computations in several different languages. (It's the most convenient way, right now.) My system calls the relevant program (e.g. Rstudio, MATLAB) with a path to a script, captures stdout and parses it for output variables,

Re: [R] tapply and error bars

2018-06-24 Thread Ogbos Okike
Hi Jim Thanks again for returning to this. please not that the line "oomean<-as.vector(by(oodf$B,oodf$A,mean))" was omitted (not sure whether deliberate) after you introduced the standard error function. When I used it, empty plot window with the correct axes were generated but no data was displa

Re: [R] tapply and error bars

2018-06-24 Thread Jim Lemon
Hi Ogbos, If I use the example data that you sent, I get the error after this line: oose<-as.vector(by(oodf$B,oodf$A,std.error)) Error in FUN(X[[i]], ...) : object 'std.error' not found The reason is that you have not defined std.error as a function, but as the result of a calculation. When I rew