Hi Pedro, Scratch that last email. I remembered that "tus.datos" was so large that it was hanging my R session last time. However, this seems to work:
tus.datos<-read.table("datayield.csv",sep=";", header=TRUE,stringsAsFactors=FALSE) row_subset<-tus.datos$DATA_TYPE_FM %in% data_types & tus.datos$TIME_PERIOD == "01/06/2020" x<-tus.datos$DATA_TYPE_FM[row_subset] y<-as.numeric(tus.datos$OBS_VALUE[row_subset]) # DATA_TYPE_FM is a character variable # unless you let it be read as a factor (beware, it may hang your R session) # and use as.numeric() it will not turn out well. barplot(y,names.arg=x) Jim ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.