Moazzam Khoja
Moazzam Khoja

Reputation: 21

why am I getting unused argument using c in r?

When I try:

x=c(1,2,3)

...I get the message unused argument (3)

When I type x=c(1,2) it takes the function but when I type x it gives me a value of [3]. I want to create a simple vector of numbers but I don't know why it is giving me this message.

Upvotes: 2

Views: 695

Answers (1)

67342343
67342343

Reputation: 816

I presume you created a user-defined function called c, thereby replacing the built-in base-r function. Try rm("c") and then everything should work as expected again.

Upvotes: 4

Related Questions