Assignment 4: part e- convert to strings

Assignment 4: part e- convert to strings

par Noor AL Kaabi,
Nombre de réponses : 3

Hi! i'm trying to figure out how to convert '09' to 'september' using the as.character function, I used September <- as.character(myfile$09), but it's not working- i'm not sure if i'm using the function right?

(in this case, myfile is the dataframe I used early on to read the data)

En réponse à Noor AL Kaabi

Re: Assignment 4: part e- convert to strings

par Cong Lu,
I don't know how to do it, but I think there is no need to convert '09' to 'September' in this part.
En réponse à Noor AL Kaabi

Re: Assignment 4: part e- convert to strings

par Erik Spence,
Do you have a column named "09"? If not, why are you trying to reference it using myfile$09?

The dates are already characters. But nonetheless, it doesn't matter whether they're number or strings, as long as you treat them appropriately for what they are.
En réponse à Noor AL Kaabi

Re: Assignment 4: part e- convert to strings

par Mahnoor Hamid,
in as.character(), the bracket should say dataframe$column because you are slicing your dataframe for a specific column to turn into a string. Remember a string is like beads on a thread so something like 1 2 3 4 5 is a string with 10 beads (you count the spaces, dashes, etc)