[R] Template Engine for R

2015-05-15 Thread Luca Cerone
Dear all, I am looking for a template engine for R. I have already come across {{mustache}} and its R implementation whisker, however I am looking for something with a few more features like "if blocks", "for loop", "block inheritance" and so on (for those of you who are familiar with Python I am

Re: [R] Need help with lm function on MAC OS X. R version - 3.2.0

2015-05-15 Thread samarvir singh
Thanks a lot Don, I did the above mentioned. And yes one of my variable field had some non numeric data. Because of large set of variables , when I used str(BSE) , some result was omitted, so that's why it went un noticed. Thank you On Fri 15 May, 2015 11:21 pm MacQueen, Don wrote: > For sure th

Re: [R] print dataframe names in loop

2015-05-15 Thread William Dunlap
You can automate the adding of the names to the list with the following function, so you can replace the dflist<-list(df1,df2,df3) names(dflist)<-c("df1","df2","df3") with dflist <- namedList(df1, df2, df3) If you supply names, such in dflist <- namedList(df1, Second=df2, log(df3)) it will

Re: [R] How to make sub-headers in R

2015-05-15 Thread Liao, Hongsheng
ate any output format you want. >> --- >> Jeff Newmiller The . . Go Live... >> DCN:Basics: ##.#. ##.#. Live Go... >>

Re: [R] R free courses-Recommendations

2015-05-15 Thread Crawford.Winnie
www.coursera.org, excellent MOOC. -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Dot Lundberg Sent: Friday, May 15, 2015 1:17 PM To: r-help@r-project.org Subject: [R] R free courses-Recommendations Hi all, I am looking for suggestions on R free courses

Re: [R] print dataframe names in loop

2015-05-15 Thread David Winsemius
On May 15, 2015, at 10:05 AM, Kai Mx wrote: > thanks, that would work, but isn't there a maybe more elegant way to > "extract" the name from the df variable within the current for (df in > list()) loop? > You do realize that the `for` function returns NULL, I hope? I was surprised when I learn

Re: [R] How to make sub-headers in R

2015-05-15 Thread Boris Steipe
; >> On May 15, 2015 6:55:17 AM PDT, "Liao, Hongsheng" wrote: >>> I know how to make one-row header for a data frame using "colnames". >>> Is there any function to insert sub-header between the first row of >>> the data and the header? Thanks

Re: [R] tables package: localization of "All" subtotals label

2015-05-15 Thread Duncan Murdoch
On 15/05/2015 10:38 AM, Patricio Cuarón wrote: > Hello. I'd like to know how could I localize (or otherwise change the > string) of the "All" subtotal that appears when using something like I just took a look at the source of the package. Currently there is no way to use the R internationalizatio

Re: [R] How to make sub-headers in R

2015-05-15 Thread Liao, Hongsheng
4571 >> >> >> >> >> [[alternative HTML version deleted]] >> >> __ >> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see >> https://stat.ethz.ch/mailman/listinfo/r-help >&

Re: [R] Interpreting GLM Interaction Contrasts in R (using glht)

2015-05-15 Thread David Robichaud
Hi Thierry and everyone else, This makes sense! I knew it would be something totally straightforward. Thanks for taking the time to let me know, Dave __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/list

Re: [R] Need help with lm function on MAC OS X. R version - 3.2.0

2015-05-15 Thread MacQueen, Don
For sure this is not a Mac OS X related problem. If the data frame is named BSE then your lm() calls need to say data = BSE, not data = bse. How many factpr levels does company have? Besides all that, I would suggest you start with simpler uses of lm, and find out if they work. For example, try

[R] R free courses-Recommendations

2015-05-15 Thread Dot Lundberg
Hi all, I am looking for suggestions on R free courses. Any suggestions? Thanks! [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do r

Re: [R] Is anyone learned Coursera course named “R Programming” of Johns Hopkins Roger D. Peng?

2015-05-15 Thread Omar André Gonzáles Díaz
You need to save your pollutantmean in your wroking directory. Then use the submit function they give in the homeworks page. Download it, or use the source() function. Then in the console, use "submit()"... thes functions needs your identification as student... then it prints notes to continue wi

[R] Is anyone learned Coursera course named “R Programming” of Johns Hopkins Roger D. Peng?

2015-05-15 Thread Mingwei Li
Hi all, Is anyone learned Coursera course named “R Programming” of Johns Hopkins Roger D. Peng? I have one question of how to submit my homework. Following is the request of the question: pollutantmean <- function(directory, pollutant, id = 1:332) { ## 'directory' is a character vector of

[R] ANOVA for nested design

2015-05-15 Thread Jinsong Zhao
Hi there, The following is a simple design. A and B are factors with their levels randomly selected. In other words, A and B are random. The data is recorded in "abc", as: > dput(abc) structure(list(water = c(12.1, 12.1, 12.8, 12.8, 14.4, 14.4, 14.7, 14.5, 23.1, 23.4, 28.1, 28.8), A = structur

Re: [R] print dataframe names in loop

2015-05-15 Thread Omar André Gonzáles Díaz
Two seconds using google: http://stackoverflow.com/questions/9002227/how-to-get-the-name-of-a-data-frame-within-a-list 2015-05-15 7:20 GMT-05:00 Jim Lemon : > Hi Kai, > One way is to name the components of your list with the names of the > data frames: > > df1<-data.frame(a=1:3) > df2<-data.fram

Re: [R] print dataframe names in loop

2015-05-15 Thread Kai Mx
thanks, that would work, but isn't there a maybe more elegant way to "extract" the name from the df variable within the current for (df in list()) loop? Best, Kai On Fri, May 15, 2015 at 2:20 PM, Jim Lemon wrote: > Hi Kai, > One way is to name the components of your list with the names of the

Re: [R] print dataframe names in loop

2015-05-15 Thread David Winsemius
On May 15, 2015, at 5:05 AM, Kai Mx wrote: > Hi everybody, > > I just can't figure this out: > > I have a loop trough several dataframes such as > > for (df in list(df1, df2, df3, ...)) { > ..some functions with df.. > } > > now I want to print out the current dataframes name (ie the list it

Re: [R] How to make sub-headers in R

2015-05-15 Thread Boris Steipe
lp >> PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. > > > > -- > BEGIN-ANTISPAM-VOTING-LINKS > -- > >

Re: [R] tables package: localization of "All" subtotals label

2015-05-15 Thread Duncan Murdoch
On 15/05/2015 10:38 AM, Patricio Cuarón wrote: > Hello. I'd like to know how could I localize (or otherwise change the > string) of the "All" subtotal that appears when using something like > library(tables) > data(iris) > > tabular((Species + 1) ~ (n=1) + Format(digits=2)* + (Sepal.Length + > Sep

Re: [R] How to make sub-headers in R

2015-05-15 Thread Liao, Hongsheng
, self-contained, reproducible code. -- BEGIN-ANTISPAM-VOTING-LINKS -- Teach CanIt if this mail (ID 03OseHrzs) is spam: Spam: https://www.spamtrap.odu.edu/canit/b.php?i=03OseHrzs&m=a356b01b838f&t=20150515&c=s N

Re: [R] How to make sub-headers in R

2015-05-15 Thread Boris Steipe
On May 15, 2015, at 9:55 AM, Liao, Hongsheng wrote: > I know how to make one-row header for a data frame using "colnames". Is > there any function to insert sub-header between the first row of the data and > the header? Thanks The elements of a data frame's columns are all of the same type.

Re: [R] Deparse substitute assign with list elements

2015-05-15 Thread William Dunlap
txt <- paste( nm, '<-', tmp, sep='' ) eval( parse(text=txt), parent.frame() ) in `foo()` will do the trick. Yuck. If you use that sort of syntax your code becomes hard to understand and you risk changing variables that users do not want changed. When the use uses somethi

Re: [R] How to make sub-headers in R

2015-05-15 Thread Bert Gunter
Hank: 1. No. 2. You would do well to go through an R tutorial -- the "Introduction to R" ships with R, but there are many more on the Web -- as you appear to be applying spreadsheet type concepts to R's data.frame data structure. While there certainly is a resemblance, conflating the two is a gr

Re: [R] How to make sub-headers in R

2015-05-15 Thread Jeff Newmiller
I think you are not interpreting what is happening correctly. Column names are labels used for purposes of referring to the data in your R code. That they might also be useful in presenting data in output is coincidental. The fact that many data input functions replace spaces in those labels wit

Re: [R] Deparse substitute assign with list elements

2015-05-15 Thread soeren . vogel
Thanks, Bill, I should have googled more carefully: http://stackoverflow.com/questions/9561053/assign-values-to-a-list-element-in-r So, remove assign(nm, tmp, parent.frame()) and add txt <- paste( nm, '<-', tmp, sep='' ) eval( parse(text=txt), parent.frame() ) in `foo(

[R] tables package: localization of "All" subtotals label

2015-05-15 Thread Patricio Cuarón
Hello. I'd like to know how could I localize (or otherwise change the string) of the "All" subtotal that appears when using something like library(tables) data(iris) tabular((Species + 1) ~ (n=1) + Format(digits=2)* + (Sepal.Length + Sepal.Width)*(mean + sd), data=iris) (that's the first example

[R] How to make sub-headers in R

2015-05-15 Thread Liao, Hongsheng
I know how to make one-row header for a data frame using "colnames". Is there any function to insert sub-header between the first row of the data and the header? Thanks Hongsheng (Hank) Liao, PhD. Lab Manager Center for Quantitative Fisheries Ecology Old Dominion University 757-683-4571

Re: [R] Determinant

2015-05-15 Thread Boris Steipe
Please keep discussion son the list. On May 15, 2015, at 5:19 AM, chasiot...@math.auth.gr wrote: > Yes, I am asking whether that integer can be exactly represented on a > computer. Yes, but it requires significant effort to do so because you need arbitrary-precision algorithms. > I use 64 bit

Re: [R] print dataframe names in loop

2015-05-15 Thread Jim Lemon
Hi Kai, One way is to name the components of your list with the names of the data frames: df1<-data.frame(a=1:3) df2<-data.frame(a=4:6) df3<-data.frame(a=7:9) dflist<-list(df1,df2,df3) names(dflist)<-c("df1","df2","df3") for(i in 1:length(dflist)) cat(names(dflist)[i],"\n") df1 df2 df3 Jim On F

[R] print dataframe names in loop

2015-05-15 Thread Kai Mx
Hi everybody, I just can't figure this out: I have a loop trough several dataframes such as for (df in list(df1, df2, df3, ...)) { ..some functions with df.. } now I want to print out the current dataframes name (ie the list items name) with the cat command before the actual functions to have

Re: [R] Plotting times at night and getting plot limits correct

2015-05-15 Thread Bob O'Hara
Thanks Thierry, Peter, Richard, Jim and Jeff for your help! In the end I used Thierry's suggetion, in essence to add a day onto the sequences that start after midnight, and this seems to work fine. Bob P.S. What I do during the day is my business, even if it mainly sems to involve feeding frozen f

Re: [R] Interpreting GLM Interaction Contrasts in R (using glht)

2015-05-15 Thread Thierry Onkelinx
Dear David, You have missed the fact that exp(-a) = 1/exp(a). Additive effects on the log scale are multiplicative effects on the original scale. Best regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg /