Hi Ding,
If you are still having trouble, perhaps:
library(prettyR)
stretch_df(test1,"vntr1","val")
Jim
On Sat, Apr 4, 2020 at 5:58 AM Yuan Chun Ding wrote:
>
> Hi R users,
>
> I want to do a data reshape from long to wide, I thought it was easy using
> tidyverse spread function, but it did no
Hi Val,
A good suggestion. The revised code is below and it will be in the
next version of plotrix.
barlabels<-function(xpos,ypos,labels=NULL,cex=1,prop=0.5,miny=0,offset=0,
nobox=FALSE,...) {
if(is.data.frame(ypos)) ypos<-as.matrix(ypos)
if(is.null(labels)) labels<-ypos
# usually don't want
Hello,
That function is new (tidyr 1.0.0) and exists in
packageVersion('tidyverse')
#[1] ‘1.3.0’
packageVersion('tidyr')
#[1] ‘1.0.2’
From the help page ?pivot_wider:
Details
pivot_wider() is an updated approach to spread(), designed to be both
simpler to use and to handle more use cases. We
Update your packages. If you still have issues post the output of sessionInfo().
On April 3, 2020 12:17:54 PM PDT, Yuan Chun Ding wrote:
>Hi Rui,
>
>Thanks a lot,
>
>i got this error, I have library(tidyverse).
>
>Ding
>
>Error in pivot_wider(., id_cols = "vntr1", names_from = "group",
>names_pre
Hi Rui,
Thanks a lot,
i got this error, I have library(tidyverse).
Ding
Error in pivot_wider(., id_cols = "vntr1", names_from = "group", names_prefix
= "a", :
could not find function "pivot_wider"
From: Rui Barradas [ruipbarra...@sapo.pt]
Sent: Fr
Hello,
It's a bit more complicated than you have coded it.
I will use pivot_wider, it's now the natural way of doing it.
test1 %>%
group_by(vntr1) %>%
mutate(group = row_number()) %>%
ungroup() %>%
pivot_wider(
id_cols ="vntr1",
names_from = "group",
names_prefix = "a",
Hi R users,
I want to do a data reshape from long to wide, I thought it was easy using
tidyverse spread function, but it did not work well. Can you help me?
Thank you,
Ding
test1 data frame is long file and test2 is the wide file I want to get
test1 <- data.frame (vntr1=c("v1","v1", "v2","v2"
Thank you Jim,
Is it possible to format the label box? The labels(numbers) are
surrounded by a big square and wanted to remove it. I just want
display only the number. I searched up the documentation for
"barlabels" and there is no such example
barlabels(xpos,ypos,labels=NULL,cex=1,prop=0.5,min
As others have pointed out, ncol calls the length function, so you are
pretty safe in terms of output of getting the same result when applied
to the results of functions like read.csv (there will be a big
difference if you ever apply those functions to a matrix or some other
data structures).
One
If you will be copying the printed coefficients into your function (instead
of just using fitted() or predict()), then use dput(coef(m)) to get them
printed to full precision.
Also, if you regress on pH-7 instead of pH you don't have to worry so much
about the roundoff or cancellation error. This
This thread points out the important and often overlooked
difference between "convergence" of an algorithm and "termination"
of a program. I've been pushing this button for over 30 years,
and I suspect that it will continue to come up from time to time.
Sometimes it is helpful to put termination c
On Thu, 2 Apr 2020 10:26:07 +
"Lim, Hwanggyu" wrote:
> when n-1th estimates and nth estimates have absolute differences
> less than 0.001 for all three parameters, the iteration must stop
> I am using nlminb optimization function
nlminb function uses the PORT library. According to [1], the
12 matches
Mail list logo