Hi thank you for your reply: it's a neat solution but unfortunately not applicable to my specific case;
in fact as I specified in my first post (I may have been not enough clear, sorry for that!) I can not rely on any search method grep-like because the value "xxx" in the rows of "df_start" can be anything (string or numeric and always different) so that I necessarely need to apply by row index position (i.e. in my reproducible example rows: 2, 3, 5); thank you again for your kind help but still searching for a solution... best -- View this message in context: http://r.789695.n4.nabble.com/shift-by-one-column-given-rows-in-a-dataframe-tp4710256p4710271.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.