[R] test multiple objects for being equal length

Manuel Gutierrez manuel_gutierrez_lopez at yahoo.es
Thu Dec 9 09:09:16 CET 2004


I could not find any help pages on How to test many
objects for being of equal length
Something like identical for more than two objects?
x<-1:6
y<-1:10
z<-3:5
## For two objects I can do:
identical(length(x),length(y))
## For more than two I currently can do:
length(unique(c(length(x),length(y),length(z))))==1

but there must be a better way.
Thanks,
M




More information about the R-help mailing list