[R] Storing tableGrobs in a list

2018-06-13 Thread Stats Student
Hi, I'm trying to generate tableGrobs in a loop, store them in a list so I can use it in a call to gtable_combine(). L1<-list() for (i in seq( ... )) { L1[i] <-tableGrob( ... ) } gtable_combine(L1, along=1) On the assignment inside the loop, I get "number of items to replace is not a

Re: [R] Calling r-scripts with arguments from other scripts, or possibly R programming conventions/style guide

2018-06-13 Thread Jeff Newmiller
I echo Bill's sentiments regarding use of functions, but think that you can afford to delay building packages while you are in the exploratory phase. You can start out by building your sequence of statements using explicitly defined variables at the beginning like fname <- "test.csv" #your

Re: [R] Data frame with Factor column missing data change to NA

2018-06-13 Thread Jim Lemon
Hi Bill, It may be that the NonAcceptanceOther, being a character value, has "" (0 length string) rather than NA. You can convert that to NA like this: df2$NonAcceptanceOther[nchar(df2$NonAcceptanceOther) == 0]<-NA Jim On Thu, Jun 14, 2018 at 12:47 AM, Bill Poling wrote: > Good morning. > >

Re: [R] Calling r-scripts with arguments from other scripts, or possibly R programming conventions/style guide

2018-06-13 Thread Alex Zarebski
Sourcing scripts is a bit hacky but it is a quick way to get a job done. If you want to take your source-ing to the next level you might want to look up how to use the "local" argument with environments. Packages are probably the way to go if you are doing anything substantial though. Also,

Re: [R] Calling r-scripts with arguments from other scripts, or possibly R programming conventions/style guide

2018-06-13 Thread MacQueen, Don via R-help
When I want to run multiple scripts one after the other, and have variables created in a script be still in memory for use by a subsequent script, I normally create a master script (say, "runall.r") and it sources each of the others in turn. For example, my master script (runall.r) would look

Re: [R] R examples in Agronomy

2018-06-13 Thread Khaled Ibrahimi
Thanks, I'll check them out. Le mer. 13 juin 2018 17:34, William Michels a écrit : > Hello, > > For introductory material there is--of course--Immer's Barley Data > (popularized by Bill Cleveland), and used extensively in R to > demonstrate lattice graphics: > > >library(lattice) > >?barley > >

[R] rJava woes on Linux Mint 18.3 Sylvia

2018-06-13 Thread J C Nash
Is anyone else having trouble with installing rJava on Linux Mint under R 3.5? I managed to work around troubles in Bunsenlabs Deuterium (Debian Jessie), but it uses older libraries (openjdk-7). Please contact off-list and I will post information when solution understood, as, looking on the net,

Re: [R] Help installing the finalfit package

2018-06-13 Thread Bill Poling
Ok, thank you David, I understand better now. I will start with the mice package issue and move any further questions to the forum you suggested. Really appreciate your help. Cheers. WHP From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Wednesday, June 13, 2018 11:33 AM To: Bill

Re: [R] R examples in Agronomy

2018-06-13 Thread William Michels via R-help
Hello, For introductory material there is--of course--Immer's Barley Data (popularized by Bill Cleveland), and used extensively in R to demonstrate lattice graphics: >library(lattice) >?barley Note the example dotplot() at the bottom of the "barley" help page, and also on the "barchart" help

Re: [R] Calling r-scripts with arguments from other scripts, or possibly R programming conventions/style guide

2018-06-13 Thread William Dunlap via R-help
Use functions calling functions instead of scripts invoking scripts. Put all your functions in a 'package'. Then your scripts would be very small, just passing command line arguments to R functions. (It is possible to call scripts from scripts, but I think it quickly leads to headaches.) Bill

Re: [R] Tables in Rmarkdown Word

2018-06-13 Thread Jeff Newmiller
I have heard of people using CSS formatting with Rmarkdown output and copy-pasting into Word/LibreOffice, but LaTeX is so much nicer if you don't require Word that I suppose there haven't been many with that itch. To some extent you can use a manually-styled Word starting document (referred to

Re: [R] Help installing the finalfit package

2018-06-13 Thread David Winsemius
> On Jun 13, 2018, at 3:20 AM, Bill Poling wrote: > > Good morning David, thank you for your reply. > > However, I am not sure what you mean regarding the windows error? I'm not a Windows user, but the first indication of a problem was when the installation procedure tried to replace an

[R] Fwd: Tables in Rmarkdown Word

2018-06-13 Thread Bert Gunter
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 ) -- Forwarded message -- From: Bert Gunter Date: Wed, Jun 13, 2018 at 8:11 AM Subject: Re: [R]

[R] Data frame with Factor column missing data change to NA

2018-06-13 Thread Bill Poling
Good morning. #I have df with a Factor column called "NonAcceptanceOther" that contains missing data. #Not every record in the df is expected to have a value in this column. # Typical values look like: # ERS # Claim paid without PHX recommended savings # Claim paid without PHX recommended

[R] R examples in Agronomy

2018-06-13 Thread Khaled Ibrahimi
Dear all, Are there good R stat examples in the field of agronomy (especially field experiments)? Thanks /- Khaled IBRAHIMI, PhD Assistant Professor, Soil Science & Environment Higher Institute of Agricultural Sciences

Re: [R] Tables in Rmarkdown Word

2018-06-13 Thread Duncan Murdoch
On 13/06/2018 10:10 AM, Bert Gunter wrote: You should post this on the r-package-devel list, not here. That list is exactly concerned with such issues. This list is about R programming itself. No, r-package-devel is about developing and publishing R packages, not using them. I don't know

Re: [R-es] Boxplot.stats

2018-06-13 Thread Carlos Ortega
Hola, Es lo que te comentaba en la segunda parte de mi respuesta. - Puedes crearte una función para ver los puntos que se van un 1.5*IQR (por arriba y por abajo) y aplicar esta función a cada columna. - O puedes utilizar un paquete (outliers) que hace este trabajo (

Re: [R] Tables in Rmarkdown Word

2018-06-13 Thread Bert Gunter
You should post this on the r-package-devel list, not here. That list is exactly concerned with such issues. This list is about R programming itself. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka

Re: [R-es] Boxplot.stats

2018-06-13 Thread Dayana Muñoz
Gracias por las respuestas, pero mi pregunta no era como obtener los outliers, sino como puedo encontrar los outliers directamente en mi base,dado que si tuviese una base de datos de 2000 datos sería tedioso buscar uno a uno los valores atípicos encontrados. Gracias de todos modos por sus

Re: [R] Fwd: Quadratic programming, for loop

2018-06-13 Thread Boris Steipe
Q[j-2] gives you Q[0] in your first inner loop iteration. R arrays start at one. B. > On 2018-06-13, at 07:21, Maija Sirkjärvi wrote: > > Amat[J-1+j-2,j-1]= 1/(Q[j] - Q[j-1]) + 1/(Q[j-1] - Q[j-2]) __ R-help@r-project.org mailing list -- To

[R] Fwd: Quadratic programming, for loop

2018-06-13 Thread Maija Sirkjärvi
Hi! I have a quadratic optimization problem and I have some difficulties coding it with R. The math version of the problem looks like this: min sum(mj -mj^)^2 which goes from 1 to J st. mj-1 <= mj - delta1 1/(Qj-1 -Qj-2)(mj-2 -mj-1) <= 1/(Qj -Qj-1 ) (mj-1 - mj) -delta2 And I'm coding it like

Re: [R] Help installing the finalfit package

2018-06-13 Thread Bill Poling
Good morning David, thank you for your reply. However, I am not sure what you mean regarding the windows error? Where or what is the windows error? And how would I remedy this issue please? Thanks WHP From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Wednesday, June 13, 2018 12:48

Re: [R] on execution time of a function...

2018-06-13 Thread Jeff Newmiller
it is not just the list that is OS-agnostic... R itself is quite OS-agnostic. However, depending on where you get your packages from they may have something unusual going on in their compiled C or Fortran code. It is just that for a computationally-oriented application like R code that messed

Re: [R] on execution time of a function...

2018-06-13 Thread akshay kulkarni
I do felt a little unsettled by your exhortions on the incongruity of posting this question on an OS-agnostic mailing list...I thought that there might be some issues on how R communicates with the OS...and also that some R packages might rectify the issue(in my experience, I have had a R

Re: [R] on execution time of a function...

2018-06-13 Thread Loris Bennett
Hi Akshay, In addition to all the things Jeff rightly points out, contention for IO resources can be an issue. So if another process was hogging the bandwidth while your program was attempting to read or write to disk, that could also have slowed things down. HTH Loris Jeff Newmiller writes:

Re: [R] on execution time of a function...

2018-06-13 Thread Jeff Newmiller
Wow, you can find almost any explanation on the Internets. That doesn't mean you should believe all of them. R does not do anything likely to tweak interrupts... if that is your problem then you need to be on an operating-system/computer-model-specific forum rather than this OS-agnostic

Re: [R] Calling r-scripts with arguments from other scripts, or possibly R programming conventions/style guide

2018-06-13 Thread Eric Berger
Hi Sam, I use the littler package for scripting. You may find it meets your needs. https://github.com/eddelbuettel/littler HTH, Eric On Wed, Jun 13, 2018 at 5:33 AM, Sam Tuck wrote: > Hi All, > I am new to R and am wondering if there is a way to pass > arguments between rscripts.

[R] Tables in Rmarkdown Word

2018-06-13 Thread Shakeel Suleman
I am relatively new to R and was wondering if someone could advise me on presenting tables in R Markdown for Word. I would like to present a simple table of counts, with column 1 representing name of an organisation (and last row called "All organisations") and another four columns representing

Re: [ESS] ess problem

2018-06-13 Thread Rob Dunne via ESS-help
Hi Vitalie, I agree, it is not likely to be an ess problem. And it seems to have fixed itself. I spent a lot of time yesterday trying different things but could not figure it out. It was happening on two machines with very different setups (see below). I cant think of any plausible explanation.