Problem transforming charaters to numeric

I have a 'tbl_df' imported into R Studio via Excel.

Now, trying to completely change all the cells that have been imported to numerical as the contents are a series of numbers. The only section of the data that I do not want as numerical is the header and the first Row. The data is currently classified as characters.

I have tried no following:

(i) Dateset <- as.numeric(Qrt_March_2021)

RESULT:
Error: 'list' object cannot be coerced to type 'double'

(ii) dateset <- as.numeric(Qrt_March_2021![1])

RESULT:
Error: unexpected '!' in "dateset <- as.numeric(Qrt_March_2021!"

  • The theory here being that by de-selecting row 1 ([1]) I would be able to prevent the error.

Any thoughts?

Hello @jack3 ,

I think that your question is easily read by a native English speaker/reader.
However I am not, so I have some problems reading it.

The only advice I have at this time is to start reading

Hi,

In addition to @HanOostdijk comments, you should try and generate a reprex of your question as this is indeed all very confusing.

A reprex consists of the minimal code and data needed to recreate the issue/question you're having. You can find instructions how to build and share one here:

Good luck,
PJ

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.