Eric Typo on my point. setwd("C:/Users/reichmaj/Documents/My_Reference_Library /Regression") myObject <- read_fst(unz("Dataset.zip", filename = "myFile.fst")) # read fst file Error in path.expand(path) : invalid 'path' argument So then I tried myObject <- read_fst(unz("C:/Users/reichmaj/Documents/My_Reference_Library /Regression /Dataset.zip", filename = "myFile.fst")) Error in path.expand(path) : invalid 'path' argument Error in the path?? Because this works just fine myObject <- read.csv(unz("C:/Users/reichmaj/Documents/My_Reference_Library /Regression /Dataset.zip", filename = "myFile.csv")) My only though is I can?t use the two function s together when dealing with fst files ?? From: Eric Berger <ericjberger at gmail.com> Sent: Wednesday, June 9, 2021 3:50 AM To: reichmanj at sbcglobal.net Cc: R mailing list <r-help at r-project.org> Subject: Re: [R] Read fst files You are missing the second closing parenthesis. This is what the error message is telling you. On Wed, Jun 9, 2021 at 2:44 AM Jeff Reichman <reichmanj at sbcglobal.net <mailto:reichmanj at sbcglobal.net> > wrote: R-Help Forum Anyone know why the following line of code would error out: myObject <- read_fst(unz("Dataset.zip", filename = "filename.fst")) Error: Incomplete expression: filename <- read_fst(unz("Dataset.zip", filename = "filename.fst") I often use similar code with *.csv files in a zipped folder. For example: myObject <- read.csv(unz("Dataset.zip", filename = "filename.csv")), which works just fine. Jeff Reichman [[alternative HTML version deleted]] ______________________________________________ R-help at r-project.org <mailto:R-help at r-project.org> 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]]
Even if ultimately you want to use the functions together, for debugging the problem you should split them into two, as in a <- unz("C:/Users/reichmaj/Documents/My_Reference_Library /Regression /Dataset.zip", filename = "myFile.fst") See if that works, and examine 'a'. And once that is working read_fst(a) to see what that does. Let us know. On Wed, Jun 9, 2021 at 3:18 PM Jeff Reichman <reichmanj at sbcglobal.net> wrote:> Eric > > > > Typo on my point. > > > > setwd("C:/Users/reichmaj/Documents/My_Reference_Library /Regression") > > myObject <- read_fst(unz("Dataset.zip", filename = "myFile.fst")) # read > fst file > > > > Error in path.expand(path) : invalid 'path' argument > > > > So then I tried > > > > myObject <- read_fst(unz("C:/Users/reichmaj/Documents/My_Reference_Library > /Regression /Dataset.zip", filename = "myFile.fst")) > > > > Error in path.expand(path) : invalid 'path' argument > > > > Error in the path?? > > > > Because this works just fine > > > > myObject <- read.csv(unz("C:/Users/reichmaj/Documents/My_Reference_Library > /Regression /Dataset.zip", filename = "myFile.csv")) > > > > My only though is I can?t use the two function s together when dealing > with fst files ?? > > > > *From:* Eric Berger <ericjberger at gmail.com> > *Sent:* Wednesday, June 9, 2021 3:50 AM > *To:* reichmanj at sbcglobal.net > *Cc:* R mailing list <r-help at r-project.org> > *Subject:* Re: [R] Read fst files > > > > You are missing the second closing parenthesis. This is what the error > message is telling you. > > > > > > On Wed, Jun 9, 2021 at 2:44 AM Jeff Reichman <reichmanj at sbcglobal.net> > wrote: > > R-Help Forum > > > > Anyone know why the following line of code would error out: myObject <- > read_fst(unz("Dataset.zip", filename = "filename.fst")) > > > > Error: Incomplete expression: filename <- read_fst(unz("Dataset.zip", > filename = "filename.fst") > > > > I often use similar code with *.csv files in a zipped folder. For example: > myObject <- read.csv(unz("Dataset.zip", filename = "filename.csv")), which > works just fine. > > > > Jeff Reichman > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org 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]]
It looks as though read_fst wants a filename, not a connection. You should do it in two steps: unzip("Dataset.zip", files = "myFile.fst") myObject <- read_fst("myFile.fst") This is obviously untested; you didn't even say what package read_fst() comes from. Duncan Murdoch On 09/06/2021 8:18 a.m., Jeff Reichman wrote:> Eric > > > > Typo on my point. > > > > setwd("C:/Users/reichmaj/Documents/My_Reference_Library /Regression") > > myObject <- read_fst(unz("Dataset.zip", filename = "myFile.fst")) # read fst file > > > > Error in path.expand(path) : invalid 'path' argument > > > > So then I tried > > > > myObject <- read_fst(unz("C:/Users/reichmaj/Documents/My_Reference_Library /Regression /Dataset.zip", filename = "myFile.fst")) > > > > Error in path.expand(path) : invalid 'path' argument > > > > Error in the path?? > > > > Because this works just fine > > > > myObject <- read.csv(unz("C:/Users/reichmaj/Documents/My_Reference_Library /Regression /Dataset.zip", filename = "myFile.csv")) > > > > My only though is I can?t use the two function s together when dealing with fst files ?? > > > > From: Eric Berger <ericjberger at gmail.com> > Sent: Wednesday, June 9, 2021 3:50 AM > To: reichmanj at sbcglobal.net > Cc: R mailing list <r-help at r-project.org> > Subject: Re: [R] Read fst files > > > > You are missing the second closing parenthesis. This is what the error message is telling you. > > > > > > On Wed, Jun 9, 2021 at 2:44 AM Jeff Reichman <reichmanj at sbcglobal.net <mailto:reichmanj at sbcglobal.net> > wrote: > > R-Help Forum > > > > Anyone know why the following line of code would error out: myObject <- > read_fst(unz("Dataset.zip", filename = "filename.fst")) > > > > Error: Incomplete expression: filename <- read_fst(unz("Dataset.zip", > filename = "filename.fst") > > > > I often use similar code with *.csv files in a zipped folder. For example: > myObject <- read.csv(unz("Dataset.zip", filename = "filename.csv")), which > works just fine. > > > > Jeff Reichman > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org <mailto:R-help at r-project.org> 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]] > > ______________________________________________ > R-help at r-project.org 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. >