I was wondering how I could test to see if the length of 3 R objects are the same or not?
Here is a simple example and what I have tried with no success:
a = c(2, 3) ; b = 2 ; c = "hi"
is.df = function(x, y, z) length(x) != length(y) != length(z) ## gives error
foo = function(...){
length(unique(lengths(list(...)))) == 1
}
foo(a, b, c)
#[1] FALSE
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With