Hi
And if you have your data frames in list you could add easily a name of those
data frames to rbinded result as R automagically uses data frame names as row
names.
> lll<- list(df1=data.frame(a=1), df2=data.frame(a=2), df3= data.frame(a=56))
> lll
$df1
a
1 1
$df2
a
1 2
$df3
a
1 56
>
Hi
Other option is aggregate or ave, depending on how do you want to plot mean/sum
values.
You should think about posting an example of what do you have and what do you
want to achieve (at least partly). Without that we are just guessing your real
intention.
Cheers
Petr
From: Ulrik Stervbo [
I saved my plots as pdf and used pdflatex. It's a few years ago and now you
can even use the r-package cowplot to create panels with subfigures. That
means more work with r, less manual work.
I believe kable from the knitr package can export tables for latex too.
Hope this helps.
Ulrik
Paul Murr
Hi
You might need an approach that converts the ggplot object to a gtable
and then either combine the gtables as here ...
http://stackoverflow.com/questions/16255579/how-can-i-make-consistent-width-plots-in-ggplot-with-legends
... or explicitly control the width of the plot within the gtable
Hi List,
Trying to update a data.frame column within a foreach nested for loop
### trial data
set.seed(666)
xyz<-as.data.frame(cbind(x=rep(rpois(5000,10),2)+1,
y=rep(rpois(5000,10),2)+1,z=round(runif(1, min=-3, max=40),2)))
xyz$mins<-rep(NA, nrow(xyz))
cl<-makeCluster(16) #adjust to your
I would think knitr package would be useful in this endeavor. And possibly
RStudio
If that doesn't do it, someone here may have a better hint, but solving this
kind of question can require studying both the input (R code) and output
(tikz/LaTeX code). While the R code belongs here, details
> On Aug 3, 2016, at 12:07 PM, Isaac Singini via R-help
> wrote:
>
> Dear AllI am new to R, I am struggling to figure out and resolve warning.I
> have fitted a joint model for survival and longitudinal data using the "JM"
> library using the syntax below.
> # Longitudinal submodellmeFit.p1_c
Hello,
not totally sure if this is a R or a LaTeX topic...
I am a total newbie to R and LaTeX, and trying to write my masters
thesis right now... I tried to get this answered via
https://cran.r-project.org/web/packages/tikzDevice/vignettes/tikzDevice.pdf
...but I failed... :(
I am creating plots
Dear AllI am new to R, I am struggling to figure out and resolve warning.I
have fitted a joint model for survival and longitudinal data using the "JM"
library using the syntax below.
# Longitudinal submodellmeFit.p1_constr <- lme(sqrtcd4wk ~ cd4tpt +
pred:cd4tpt, data = cd4long_constr,
Dear All,
My question is simple (but the answer perhaps less): how does R lm()
function benefit from an optimized BLAS library (such as ATLAS, OpenBLAS, or
the MKL library in R Open)? I suppose that these BLAS optimizations
concentrate on the level-3 BLAS, and lm() function relies on level-1 BL
I'm trying to reproduce some results from Hosmer & Lemeshow's "Applied Logistic
Regression" second edition, pp. 74-79. The objective is to estimate odds ratios
for low weight births with interaction between mother's age and weight
(dichotomized at 110 lb.). I can get the point estimates, but I c
Hi,
In regards to your first question:
>Hi R users,
>I have a dataframe, with daily precipitation data, is it possible to plot
>annual mean or annual sum values directly? Thanks for your help.
>df
>year month day precip time
>2010 1 10.5 2010-01-01
>2010
Unless there is good reason to do otherwise, you should cc the list to
allow others to provide perhaps better responses or to correct my
possible errors. I have done so here.
If your "parameter" is fixed in the modeling it cannot contribute to
the uncertainty of estimation of the remaining model p
That Petr already showed. Please read his email again.
lily li schrieb am Mi., 3. Aug. 2016 21:09:
> Thanks. How to add an additional column, with the name of each dataframe's
> name?
>
> On Wed, Aug 3, 2016 at 1:06 PM, Ulrik Stervbo
> wrote:
>
>> Not quite - this works: rbind(df1, df2, df3, df
Thanks. How to add an additional column, with the name of each dataframe's
name?
On Wed, Aug 3, 2016 at 1:06 PM, Ulrik Stervbo
wrote:
> Not quite - this works: rbind(df1, df2, df3, df1, df2, df3)
>
> Or if the have your data.frames in a list, use do.call:
>
> df.lst <- list(df1, df2, df3, df1, d
Not quite - this works: rbind(df1, df2, df3, df1, df2, df3)
Or if the have your data.frames in a list, use do.call:
df.lst <- list(df1, df2, df3, df1, df2, df3)
do.call(rbind, df.lst)
You might take a look at the facet functionality in ggplot once you are
ready to build your plots.
Best,
Ulrik
You could use dplyr:
library(plyr)
ddply(df, .variables = "year", summarise, mean.precip = mean(precip))
Hope this helps
Ulrik
On Wed, 3 Aug 2016 at 17:29 lily li wrote:
> I meant that my dataframe has daily data, but how to plot annual mean/sum
> directly? Thanks.
>
> On Wed, Aug 3, 2016 at
Vicente:
You have not received a reply. I think it is because your post appears
to reveal a profound lack of understanding about how empirical
modeling works: the uncertainty in parameter estimates derives from
the uncertainty in the data (via the modeling process, of course). You
cannot set them
Thanks, but rbind/merge function only combines two dataframes each time,
how to work on multiple dataframes? Thanks again.
On Wed, Aug 3, 2016 at 4:20 AM, PIKAL Petr wrote:
> Hi.
>
> Hm. I would add a column indicating data frame and merge/rbind all data
> frames.
>
> Something like
>
> df1$fr
I meant that my dataframe has daily data, but how to plot annual mean/sum
directly? Thanks.
On Wed, Aug 3, 2016 at 4:16 AM, PIKAL Petr wrote:
> Hi
>
> What do you mean to plot annual mean/sum directly? You can compute it by
> aggregate function and add it to your plot, but I am not sure if it is
There are at least two canonical correspondence analysis functions named cca()
in different R packages so we don't have enough information to begin. The
posting guide encourages providing a reproducible example using dput() to
provide enough data so that we can run your code. If we don't know an
Dear all;
I am sorry for my earlier post without subject. My question in earlier mail
was:
I am going to run models for variable selection using elastic-net. Because
I have about 1500 descriptive (independent) variables which they are highly
correlated. Before running elastic-net and even single
Hi all;
I am going to run models for variable selection using elastic-net. Because
I have about 1500 descriptive (independent) variables which they are highly
correlated. Before running elastic-net and even single regressions (~1500)
I need get fitted values for dependent variables using MIXED mo
Part of the confusion is that Bonferroni is often described as an adjustment to
the significance level (sig-level) not the p-value. For example, to evaluate
p-values when there are 8 tests, we compare the p-value to the sig-level/8 so
the sig-level decreases. The p.adjust() function adjusts the
Hi Duncan and Jim,
Yes, definitely you are right. I should comment the third par().
par(mfrow=c(1,2))
stn_all<-matrix(400*rnorm(20)+4,ncol=2)
par(mar=c(4,4,2,1.2),oma = c(1, 1, 1, 1),xaxs="i", yaxs="i")
hist(stn_all[,1],prob=TRUE, main ="Balok ",col="yellowgreen", cex.axis=1.2,
xlab="Rain (mm)"
On 03/08/2016 8:01 AM, roslinazairimah zakaria wrote:
Hi Jim,
I tried your code, however it still gives me only one plot. I don't
understand what is going on. Any clue?
The third par() call tells R that you want to start a new page. (So did
the second one, but it wasn't a problem there.) Ju
Hi Jim,
I tried your code, however it still gives me only one plot. I don't
understand what is going on. Any clue?
On Wed, Aug 3, 2016 at 4:55 PM, Jim Lemon wrote:
> Hi Roslina,
> You only specify space for two plots in:
>
> par(mfrow=c(1,2))
>
> However, you only try to plot two plots, so I
Dear all,
I would like to introduce an input parameter with an associated standard
error to perform a fitting using the nls function (or any similar function):
parameter1 = 9.00 +/- 0.20 (parameter 1 has a value of 9.00 and standard
error of 0.20)
fittingResults <- nls(y ~ function(xdata, ydata
Hi.
Hm. I would add a column indicating data frame and merge/rbind all data frames.
Something like
df1$fr <- 1
df2$fr <- 2
dfkompl <- rbind(df1, df2)
ggplot(dfkompl, aes(x=time, y=varA, colour=factor(fr))
Cheers
Petr
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-proje
> p.adjust for bonferroni p value correction does not appear to be working
> correctly:
You should re-check what a Bonferroni correction does, or at least reboot your
intuition (mine needs rebooting all the time). All the p-values should
_increase_ by a factor of n, with a ceiling of 1.0. Dividin
Hi
What do you mean to plot annual mean/sum directly? You can compute it by
aggregate function and add it to your plot, but I am not sure if it is enough
direct.
Cheers
Petr
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of lily li
> Sent: Tuesday,
Dear R users,
I'm glad to announce the new version of water package (0.5).
As this is my first message to the list, I want to add that this
package provides tools to estimate actual evapotranspiration from
surface energy balance models.
Right now you can run the well-know METRIC model using it.
p.adjust for bonferroni p value correction does not appear to be working
correctly:
> p <- runif(50)
>
> p
[1] 0.08280254 0.08955706 0.19754389 0.52812033 0.68907772 0.21849696
0.02774784 0.23923562 0.03482480 0.76437481 0.87236155 0.76438604
[13] 0.37432032 0.89630318 0.01626565 0.08152060 0.557
Dear Rosalina
I do not think par(mfrow(c(1, 2)) does what you think it does although
mfrow(c(2, 2)) might.
You could consider using layout() instead
On 03/08/2016 06:44, roslinazairimah zakaria wrote:
Dear r-users,
I would like to plot 4 graphs arranged as 2 by 2 and follows are my codes.
H
Hi Roslina,
You only specify space for two plots in:
par(mfrow=c(1,2))
However, you only try to plot two plots, so I will assume that you
only want two. You haven't defined "x" in the above code, which will
cause an error. The code below gives me two plots as I would expect (I
made up the data th
35 matches
Mail list logo