Problem with Encoding

Asked

Viewed 78 times

0

I’m doing a job in college that I had to do an opinion poll, and for that I used Google Forms to do this job. After collecting the answers I imported the file using the read_xlsx and had an enconding problem:

base <- read_xlsx("Banco/Trabalho 3/base1.xlsx") 

How could I fix this?

inserir a descrição da imagem aqui ``` dput(head(base, 20))

base<-read_xlsx("Database/Job 3/base.xlsx") dput(head(base, 20)) Structure(list(sex = c("Male", "Male", "Male", "Male", "Male", "Male", "Male", "Male", "Male", "Male", "Male", "Male", "Male", "Male", "Male", "Male", "Male", "Male", "Male", "Male"), age = c(13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14), schooling = c("Elementary School - High School", "Elementary School - Complete", "Elementary School - Complete", "Elementary School - Complete", "Elementary School - Complete", "Elementary School - Complete", "Elementary School - Complete", "Elementary School - Complete", "Elementary School - Complete", "Elementary School - Complete", "Elementary School - Complete", "Elementary School - Complete", "Elementary School - Complete", "Elementary School - Complete", "Elementary School - Complete", "Elementary School - Complete", "Elementary School - Complete", "Elementary School - Complete", "Elementary School - Complete", "Elementary school - Complete"), civil school = c("Casado(a) or Unio Estvel", "Casado(a) or Unio Estvel", "Casado(a) or Unio Estvel", "Casado(a) or Unio Estvel", "Casado(a) or Unio Estvel", "Casado(a) or Unio Estvel", "Casado(a) or Unio Estvel", "Casado(a) or Unio Estvel", "Casado(a) or Unio Estvel", "Casado(a) or Unio Estvel", "Casado(a) or Unio Estvel", "Casado(a) or Unio Estvel", "Casado(a) or Unio Estvel", "Casado(a) or Unio Estvel", "Casado(a) or Unio Estvel", "Casado(a) or Unio Estvel", "Casado(a) or Unio Estvel", "Casado(a) or Unio Estvel", "Casado(a) or Unio Estvel", "Casado(a) or Unio Estvel"), estado = c("Gois", "So Paulo", "So Paulo", "Minas Gerais", "So Paulo", "Paran", "So Paulo", "So Paulo", "Minas Gerais", "So Paulo", "Piau", "Mato Grosso", "So Paulo", "So Paulo", "So Paulo", "Rio Grande do Sul", "Rio Grande do Sul", "So Paulo", "Rio Grande do Sul", "So Paulo"), genero_jogo = c("FPS (First Person Shooter) /TPS (Third Person Shooter), MMORPG (Massive Multiplayer Online Role Playing Game), Simulators, Sports, Fighting", "Ao e Aventura", "FPS (First Person Shooter) /TPS (Third Person Shooter), RPG (Role Playing Game), MOBA (Multiplayer Online Battle Arena), Battle Royale, Sports", "FPS (First Person Shooter) /TPS (Third Person Shooter), Battle Royale", "FPS (First Person Shooter) /TPS (Third Person Shooter), RPG (Role Playing Game)", "FPS (First Person Shooter) /TPS (Third Person Shooter), Simulators, Sports", "FPS (First Person Shooter) /TPS (Third Person Shooter), Battle Royale", "FPS (First Person Shooter) / TPS (Third Person Shooter), RPG (Role Playing Game), Simulators, Ao and Adventure, Puzzle", "FPS (First Person Shooter) /TPS (Third Person Shooter), Simulators", "FPS (First Person Shooter) /TPS (Third Person Shooter), MOBA (Multiplayer Online Battle Arena)", "FPS (First Person Shooter) /TPS (Third Person Shooter), MOBA (Multiplayer Online Battle Arena)", "FPS (First Person Shooter) / TPS (Third Person Shooter), MMORPG (Massive Multiplayer Online Role Playing Game), Battle Royale, Ao and Aventura, Puzzle", "FPS (First Person Shooter) /TPS (Third Person Shooter)", "FPS (First Person Shooter) /TPS (Third Person Shooter)", "FPS (First Person Shooter) / TPS (Third Person Shooter)", "FPS (First Person Shooter) / TPS (Third Person Shooter), Battle Royale, Simulators, Ao and Adventure", "FPS (First Person Shooter) /TPS (Third Person Shooter), Sports", "FPS (First Person Shooter) / TPS (Third Person Shooter), Battle Royale, Fighting", "FPS (First Person Shooter) / TPS (Third Person Shooter), MOBA (Multiplayer Online Battle Arena), Sports, Fighting", "FPS (First Person Shooter) / TPS (Third Person Shooter), Battle Royale" ), weektime_week = c("of 4 6 hours", "of 4 6 hours", "more than 6 hours", "more than 6 hours", "of 4 6 hours", "more than 6 hours", "more than 6 hours", "of 4 6 hours", "more than 6 hours", "more than 6 hours", "of 4 6 hours", "4 6 hours", "more than 6 hours", "2 4 hours", "more than 6 hours", "more than 6 hours", "2 4 hours", "more than 6 hours", "more than 6 hours", "more than 6 hours"), platform = c("PC (Steam, Origin, Uplay, etc)", "PS3 / PS4 / PS4 Pro", "PC (Steam, Origin, Uplay, etc), PS3 / PS4 / PS4 Pro, Mobile and Portable", "PC (Steam, Origin, Uplay, etc), PS3 / PS4 / PS4 Pro, Mobile and Portable", "PC (Steam, Origin, Uplay, etc), Mobile and Portable", "PC (Steam, Origin, Uplay, etc)", "PC (Steam, Origin, Uplay, etc), Xbox 360 / Xbox One / Xbox One X / Xbox One S, Mobile and Portable", "PC (Steam, Origin, Uplay, etc), Mobile and Portable", "PC (Steam, Origin, Uplay, etc), PS3 / PS4 / PS4 Pro, Mobile and Portable", "PC (Steam, Origin, Uplay, etc), Xbox 360 / Xbox One / Xbox One X / Xbox One S", "Mobile and Portable", "PC (Steam, Origin, Uplay, etc), Wii / Wii U / Switch, Mobile and Portable", "PC (Steam, Origin, Uplay, etc), Xbox 360 / Xbox One / Xbox One X / Xbox One S, Mobile & Portable", "PC (Steam, Origin, Uplay, etc), Xbox 360 / Xbox One / Xbox One X / Xbox One S, PS3 / PS4 / PS4 Pro, Mobile and Portable", "PC (Steam, Origin, Uplay, etc), Xbox 360 / Xbox One / Xbox One X / Xbox One S, Mobile & Portable", "PS3 / PS4 / PS4 Pro, Mobile & Portable", "PC (Steam, Origin, Uplay, etc), Xbox 360 / Xbox One / Xbox One X / Xbox One S, Mobile & Portable", "PC (Steam, Origin, Uplay, etc), Xbox 360 / Xbox One / Xbox One X / Xbox One S", "PC (Steam, Origin, Uplay, etc), PS3 / PS4 / PS4 Pro, Mobile and Portable", "PC (Steam, Origin, Uplay, etc), Mobile and Portable"), p_venda = c("No", "Yes", "No", "Yes", "No", "Yes", "No", "No", "No", "No", "No", "No", "No", "No", "No", "No", "No" ), tag = c("No", "No", "No", "No", "No", "No", "No", "No", "No", "No", "No", "Yes", "No", "No", "No", "No", "No", "No"), midia = c("Fsica", "Fsica", "Fsica, Digital", "Digital", "Digital", "Digital", "Digital", "Digital", "Digital", "Fsica", "Fsica, Digital", "Digital", "Digital", "Digital", "Fsica", "Fsica, Digital", "Digital", "Digital", "Fsica, Digital", "Digital" ), products = c("Merchandising (Shirts, Fur, Action Figures, etc...)", "None", "DLC (Downloadable Content) / Season Pass, Skins", "Skins", "Skins, Enhancements (XP Boost, Gold Boost, etc...)", "DLC (Downloadable Content) / Season Pass, Skins", "Skins", "DLC (Downloadable Content) /Season Pass", "None", "Skins", "Skins, Enhancements (XP Boost, Gold Boost, etc...)", "DLC (Downloadable Content) / Season Pass, Skins", "Skins", "Skins, Merchandising (Shirts, Fur, Action Figures, etc...)", "Skins", "DLC (Downloadable Content) /Season Pass", "Skins, Enhancements (XP Boost, Gold Boost, etc...)", "Skins", "Skins, Merchandising (Shirts, Fur, Action Figures, etc...)", "Other"), event" ))```

OBS; I don’t know if this information is relevant but the form was made on the PC running Linux and I am opening this file on a Mac

  • Can you please, edit the question with the departure of dput(base) or, if the base is too large, dput(head(base, 20))?

  • Gabriel, post the code, not your print.

  • I’m sorry for the mistakes but don’t mess with Stack too much

  • I found a solution in Stack gringo, follow the link [Solution][1] https://stackoverflow.com/questions/23324872/rstudio-not-picking-the-encoding-im-telling-it-to-use-when-reading-a-file

  • Answer from the questioner himself: https://stackoverflow.com/questions/23324872/rstudio-not-picking-the-encoding-im-telling-it-to-use-when-reading-a-file

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.