[R] Windows path backward slash

Bill Dunlap w||||@mwdun|@p @end|ng |rom gm@||@com
Thu Dec 24 18:12:17 CET 2020


The "\n" is probably not in the file name.  Does omitting it from the call
to str_c help?

-Bill

On Thu, Dec 24, 2020 at 6:20 AM Anbu A <rquestion2020 using gmail.com> wrote:

> Hi All,
> I am a newbie. This is my first program.
> I am trying to read SAS dataset from below path. I added escape "\" along
> "\" found in path C:\Users\axyz\Desktop\sas\  but still not working.
>
> fsasdat<-function(dsn) {
>   pat="C:\\Users\\axyz\\Desktop\\sas\\"
>   str1=str_c(pat,dsn,".sas7bdat","\n")
>   allmetrx=read_sas(str1)
> }
> fsasdat("all")
>
> Please help me.
>
> Thanks,
> AA.
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help using 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]]



More information about the R-help mailing list