[R] Doubt_merging data
Lara Dutra Silva
l@r@dutr@@ilv@ @ending from gm@il@com
Mon Apr 9 00:47:55 CEST 2018
Hello,
I gather data from 5 objects and 5 data. frames and would like to join
information.
join: pb_SM + pb_T + pb_P + pb_F + pb_SJ = total_pb
join: sdmdata_SM + sdmdata_T + sdmdata_P + sdmdata_F + sdmdata_SJ
=total_sdmdata
code:
rbind, merge?
total_pb<- ??
total_sdmdata<- ??
1
absvals_SM <- extract(grid_present_SM, absences_10000)
presvals_SM <- extract(grid_present_SM, LSM)
pb_SM <- c(rep(1, nrow(presvals_SM), rep(0, nrow(absvals_SM)))
sdmdata_SM <- data.frame(cbind(pb_SM, rbind(presvals_SM, absvals_SM))
######
2
absvals_T <- extract(grid_present_T, absences_10000)
presvals_T <- extract(grid_present_T, LT)
pb_T <- c(rep(1, nrow(presvals_T), rep(0, nrow(absvals_T)))
sdmdata_T <- data.frame(cbind(pb_T, rbind(presvals_T, absvals_T))
######
3
absvals_P <- extract(grid_present_T, absences_10000)
presvals_P <- extract(grid_present_P, LP)
pb_P <- c(rep(1, nrow(presvals_P), rep(0, nrow(absvals_P)))
sdmdata_P <- data.frame(cbind(pb_P, rbind(presvals_P, absvals_P))
######
4
absvals_F <- extract(grid_present_F, absences_10000)
presvals_F <- extract(grid_present_F, LF)
pb_F <- c(rep(1, nrow(presvals_F), rep(0, nrow(absvals_F)))
sdmdata_F <- data.frame(cbind(pb_F, rbind(presvals_F, absvals_F))
######
5
absvals_SJ <- extract(grid_present_SJ, absences_10000)
presvals_SJ <- extract(grid_present_SJ, LSJ)
pb_SJ <- c(rep(1, nrow(presvals_SJ), rep(0, nrow(absvals_SJ)))
sdmdata_SJ <- data.frame(cbind(pb_SJ, rbind(presvals_SJ, absvals_SJ))
Regards,
Silva
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Sem
vírus. www.avg.com
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
[[alternative HTML version deleted]]
More information about the R-help
mailing list