Displaying 3 results from an estimated 3 matches for "vrb_nm".
Did you mean:
kr_nm
2023 Jan 26
2
Resumen de R-help-es, Vol 167, Envío 10
...;1","0"), 10, TRUE)
, V4b = sample(c("1","0"), 10, TRUE))
dt[,":="(seq=.I)]
setcolorder(dt,"seq")
dt1 <- melt(dt,id.vars=1,measure.vars=2:ncol(dt),variable.name="vrb",
value.name="vl")
dt1[,":="(vrb_nm=str_sub(vrb,end=2),vrb_tp=str_sub(vrb,start=-1))]
dt2 <- dcast(dt1,seq+vrb_nm~vrb_tp,fun.aggregate=\(x)
paste0(x,collapse="|"),value.var="vl")
dt2[,":="(c=fifelse(a=="1"|b=="1","1","0"))]
dt3 <-dcast(dt2,seq~vrb_nm,fun.aggr...
2023 Jan 27
0
Resumen de R-help-es, Vol 167, Envío 10
..."), 10, TRUE))
> > > dt[,":="(seq=.I)]
> > > setcolorder(dt,"seq")
> > >
> > > dt1 <- melt(dt,id.vars=1,measure.vars=2:ncol(dt),variable.name="vrb",
> > > value.name="vl")
> > > dt1[,":="(vrb_nm=str_sub(vrb,end=2),vrb_tp=str_sub(vrb,start=-1))]
> > > dt2 <- dcast(dt1,seq+vrb_nm~vrb_tp,fun.aggregate=\(x)
> > > paste0(x,collapse="|"),value.var="vl")
> > > dt2[,":="(c=fifelse(a=="1"|b=="1","1","0&qu...
2023 Jan 28
0
Resumen de R-help-es, Vol 167, Envío 10
..."), 10, TRUE))
> > > dt[,":="(seq=.I)]
> > > setcolorder(dt,"seq")
> > >
> > > dt1 <- melt(dt,id.vars=1,measure.vars=2:ncol(dt),variable.name="vrb",
> > > value.name="vl")
> > > dt1[,":="(vrb_nm=str_sub(vrb,end=2),vrb_tp=str_sub(vrb,start=-1))]
> > > dt2 <- dcast(dt1,seq+vrb_nm~vrb_tp,fun.aggregate=\(x)
> > > paste0(x,collapse="|"),value.var="vl")
> > > dt2[,":="(c=fifelse(a=="1"|b=="1","1","0&qu...