Error: unexpected symbol .


Kan anyone help meg? I'm trying to create a new dataframe just with a few colums off the original one, but it says:
Error: unexpected symbol in "novo_df<- subset(df, select=c("host_is_superhost",\u201chost_identity_verified

"Here is the code:

new_df<- subset(df, select=c("host_is_superhost",“host_identity_verified”,“bathrooms”,“bedrooms”,“daily_price”,“security_deposit”,“minimum_nights”,“number_of_reviews”,“review_scores_rating” ))

Thank you :slight_smile:

Hi @cfmr,
Welcome to the Rstudio Community Forum.

Your code contains non-ASCII double quote characters (probably introduced via a word processing program or another editor). Simply replace those with normal double quote characters and that should fix it.

Your code has two kinds of quotes. Compare " and “. Change all of them to the first, straight quotes.

This topic was automatically closed 7 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.