I cannot work with excel sheets, nor csv sheets
both reading function do not work, only errors received:
When i work with Excel i write in R:
setwd("~/Documents/FINTECH/GAMES ANALYIS")
library(readxl)
file.choose("Games_kurz")
mydata<-read_excel("Games_kurz")
and I get: > mydata<-read_excel("Games_kurz")
Fehler: path does not exist: ‘Games_kurz’
OR
path` must be a string
I also installed quartz in the background, as my teacher said this might be the problem in R-studio on Mac, does anyone can help me? R: OS X Quartz Device
Also, do i need to do anything in the background to make use of that? thank you!!
Check in Finder to confirm that the Games_kurz file doesn't have an extension, or just try with Games_kurz.xlsx.
To cut down on file location problems, create a new Project in RStudio for related scripts and create a folder data and put all your data files for the scripts there. install.libraries("here") and use library(here) in your script. Then you will be able to use
my_data <- read_excel(here("data/the_file.xlsx"))
knowing that it should work everytime even if your working directory is another folder in the project.
One way to think about this is that anything (object) that R already "knows about" (is in namespace in the environment) doesn't need "" quotation marks, but anything new coming into the environment, like a file, does.