[R] Windows path backward slash

Jeff Newmiller jdnewm|| @end|ng |rom dcn@d@v|@@c@@u@
Thu Dec 24 15:28:14 CET 2020

Simplest suggestion is to forget turning this into a function. Alternatively, remove the "allmetrx=" from the last line of your function, as the assignment suppresses automatic printing of the result. However, it may already be working... you could assign the result of the function call outside the function and see what is in that new variable:

ans <- fsasdat("all")

On December 23, 2020 7:08:05 PM PST, 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 "\"
>"\" 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)
>Please help me.
>	[[alternative HTML version deleted]]
>R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.

Sent from my phone. Please excuse my brevity.

More information about the R-help mailing list