Skip to content
Prev 21344 / 29559 Next

Local_coord

Hello K?tia,

That sounds more like a dataframe manipulation problem; though we can 
help. See the code below.

library(dplyr)

coord <- read.table('Coord_ha_R.txt', header = TRUE, fill = TRUE)

plots <- 'ref_sub_parc_coord.txt' %.%
   read.table(header = TRUE) %.%
   mutate(Sub_parc = seq(1,10)) %.%
   merge(coord, by = 'Sub_parc') %.%
   mutate(X_global = X_local + X, Y_global = Y_local + Y)


Is it more or less what you're aiming at? There are certainly many ways 
to come to the same result.
Also you may want to take a look at the dplyr vignette, it's a quick 
read. 
(http://cran.rstudio.com/web/packages/dplyr/vignettes/introduction.html)

Cheers,
--
Lo?c Dutrieux
Wageningen University
On 14-07-20 05:51 PM, K?tia Emidio wrote: