Access Method Array Javascript Length Function In R