a is an array of numbers.

a[3] = "hello"

: Type error

: Sure, why not?

: Yes, and I'll turn all the other elements into strings, too

@peterdrake out of interest: regarding #rstats, is a a list or a vector in this case?

Follow

@basepair A vector. R lists behave (in this respect) like Python lists.

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.