Skip to content
Prev 385814 / 398503 Next

merged data frame with <NA>

Hi Stefano,

For the merge() part, I'll leave it to more expert users (I rarely use 
merge(), and every time I need it, it's painful...).

To know why <NA> instead of NA, check the results with str(df3); I guess 
it is not the mode you expected.

For more details, you should provide the file, or better a reproducible 
example using dput().

For the second part, your syntax was not correct (subsetting a column 
for elements based on a column that is not part of the subset!). And 
there is no column "pch" in your example. Try:
df3[df3$event == "start", "event"] <- 24

HTH,
Ivan

--
Dr. Ivan Calandra
TraCEr, laboratory for Traceology and Controlled Experiments
MONREPOS Archaeological Research Centre and
Museum for Human Behavioural Evolution
Schloss Monrepos
56567 Neuwied, Germany
+49 (0) 2631 9772-243
https://www.researchgate.net/profile/Ivan_Calandra
On 29/09/2020 9:59, Stefano Sofia wrote: