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
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
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
ate any output format you want.
>> ---
>> Jeff Newmiller The . . Go Live...
>> DCN:Basics: ##.#. ##.#. Live Go...
>>
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
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
;
>> 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
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
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
>&
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
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
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
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
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
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
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
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
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
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
> --
>
>
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
, 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
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.
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
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
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
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(
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
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
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
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
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
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
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 /
33 matches
Mail list logo