> On May 3, 2017, at 11:24 AM, Davide Piffer <pifferdav...@gmail.com> wrote:
> 

You should look at this result more closely. Its length is not the same length 
as the number of rows of the target of the attempted assignment.

> unlist(miniblock_cong)

You might try:

red_congruent$miniblock <- ave( red_congruent$subject_nr, 
red_congruent$subject_nr, FUN=seq_along)

`ave` is very useful for delivering vectors with length equal to nrow of a 
dataframe. Do remember to name the FUN parameter (although I still usually 
forget).

-- 

David Winsemius
Alameda, CA, USA

______________________________________________
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.

Reply via email to