I used the his2arr function in Rstudio to create a large array dataset. I tried to subset this array in order to be able to work with the data I need. To do this I used the following script:
I am not sure whether I got your question right, but I think you have a dataframe and want to prduce an array (I think, technically it is a vector) from a column on the basis of information of another column. Try whether
Janna Burik "df$variable" makes no sense because you have no dataframe by the name of "df". The only dataframe you provided is "df_GPP". This is why the above code failed as Jochen Wilhelm pointed out.