Andrew
Thank you so much. That was an easy fix. I you have some time I’d like some more info on the close function close(con) Jeff From: Andrew Simmons <[email protected]> Sent: Sunday, October 17, 2021 3:35 PM To: [email protected] Cc: R-help Mailing List <[email protected]> Subject: Re: [R] here Package You've just got the brackets in the wrong spot: creditsub <- read.csv(unz(here::here("Data.zip"), "creditcardsub.csv")) instead of creditsub <- read.csv(unz(here::here("Data.zip", "creditcardsub.csv"))) Also, you probably want to save that connection and close it manually. creditsub <- read.csv(con <- unz(here::here("Data.zip"), "creditcardsub.csv")) ; close(con) I hope this helps! On Sun, Oct 17, 2021 at 4:23 PM Jeff Reichman <[email protected] <mailto:[email protected]> > wrote: R-help I have a R project that contains an R Notebook and I am trying to use the "here" function to access a file. Before using R projects file I would set the working dir in a R setup chunk and run the following command (for example) creditsub <- read.csv(unz(Data.zip", "creditcardsub.csv")) This works just fine but I'm trying to see if I can use the here function now but no luck. I sort of assumed it would be something like creditsub <- read.csv(unz(here::here(Data.zip", "creditcardsubcsv"))) - nope. I've also tried placing it in other locations still no luck so I'm wondering if I can even use it in this application Jeff [[alternative HTML version deleted]] ______________________________________________ [email protected] <mailto:[email protected]> mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] ______________________________________________ [email protected] mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

