Issue with numeric variables

Hello, I'm new to Rstudio and already a bit lost.
I imported the csv file with my data with worked well. I have a few numeric variables (numbers) and a few characters. When imported the data, it shows the numbers as num. But once I check with is.numeric or in general what class it is, it shows that the variable is classified as character. I tried every fix I found googling, but nothing worked. Some do have missing values which is set as empty, but the first variable is the number 1-318 without missing values and it still is somehow classified as characters or double (even though it shows an num when viewing the data).
Anyone can help me with fixing this?
Thanks in advance

Can you provide a reproducible example?

The imported dataset looks something like that

As an example, "Response" are the number 1-318 without missing values.

As far as I can see, the ones that should be set as numeric are (there are a few character variables).

If I run a summary of the whole dataset, it looks something like that (which is what I want/need):


But if I do it individually, it shows up as character:


Hope this helps.

your last post shows you are asking to get a summary of a single string whose content is the text 'Response'
if you want to get the Response vector out of your dataframe that you called dataset you would need to use the $ operator.


Thanks a lot. As I said, I am new to R and Rstudio and the tutorials I watched told me to do as I posted. The $ operator seemed to work. Thanks a lot!

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.