Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/data folder doesn't seem to work #12

Open
joseph-allen opened this issue Jul 28, 2021 · 2 comments
Open

/data folder doesn't seem to work #12

joseph-allen opened this issue Jul 28, 2021 · 2 comments

Comments

@joseph-allen
Copy link

When I add a data folder as I've done here -> https://github.com/UKDataServiceOpen/r-course-starter/tree/master/data

running

# test read in the dataset from /data/test.txt
df <- read.table('data/test.txt', header = FALSE)

causes

Warning message in file(file, "rt"):
“cannot open file 'data/test.txt': No such file or directory”
Error in file(file, "rt"): cannot open the connection
Traceback:

1. read.table("data/test.txt", header = FALSE)
2. file(file, "rt")

meanwhile

# read from web hosted files
df <- read.table("https://s3.amazonaws.com/assets.datacamp.com/blog_assets/test.txt", 
                 header = FALSE)

works

@joseph-allen
Copy link
Author

I've tried it with a .csv and it does work, I am guessing somewhere only .csvs are allowed through as datasets but this wasn't clear in the docs.

Thanks anyway Ines!

@joseph-allen
Copy link
Author

looking at this again I need to load in SPSS .sav files too, so I might have to convert it to .CSV and lose some benefit in this process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant