Re: [R] Finance & R

2020-12-24 Thread Abby Spurdle
Dear All, One of the most significant contributors to open source finance is: Diethelm Würtz https://comp.phys.ethz.ch/news-and-events/nc/2016/08/in-memoriam-diethelm-wuertz.html And on that note, I'd like to wish Merry Christmas to a great mathematician and programmer, and his family. A quick

Re: [R] Windows path backward slash

2020-12-24 Thread Tom Woolman
In Windows versions of R/RStudio when refering to filename paths, you need to either use two "\\" characters instead of one, OR use the reverse slash "/" as used in Linux/Unix. It's an unfortunate conflict between R and Windows in that a single \ character by itself is treated as an esc

Re: [R] Windows path backward slash

2020-12-24 Thread Dr Eberhard W Lisse
What happens if you go to the import tool in RStudio? It should do your bidding, and, it produces code which you then can copy and paste. el On 2020-12-24 19:31 , Anbu A wrote: > Hi Bill, > r"{C:\Users\Anbu\Desktop\sas\}" - This is the key and code below worked. > fsasdat<-function(dsn) { >

Re: [R] Windows path backward slash

2020-12-24 Thread Anbu A
Hi Bill, r"{C:\Users\Anbu\Desktop\sas\}" - This is the key and code below worked. fsasdat<-function(dsn) { pat=r"{C:\Users\Anbu\Desktop\sas\}" str1=str_c(pat,dsn,".sas7bdat") read_sas(str1) #return(str1) } allmetrx=fsasdat("all") str(allmetrx) Thank you. Anbu. On Thu, Dec 24, 2020 at 1

Re: [R] Windows path backward slash

2020-12-24 Thread Anbu A
Thanks, Jeff. The reason I am creating the function is I have to read some more datasets too. I have also modified the code as per your suggestion. I have to send the dataset name in parameter in subsequent calls. fsasdat<-function(dsn) { pat="C:\\Users\\Anbu\\Desktop\\sas\\" str1=str_c(pat,ds

Re: [R] Windows path backward slash

2020-12-24 Thread Bill Dunlap
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 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:\U

Re: [R] Windows path backward slash

2020-12-24 Thread Jeff Newmiller
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

[R] Windows path backward slash

2020-12-24 Thread Anbu A
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")

Re: [R] Finance & R

2020-12-24 Thread Gabor Grothendieck
I personally use the packages you mention and would describe them as well thought out and relatively bug free through widespread use and years of improvement and maintenance. There are literally dozens of other packages that depend on these packages so if you use them you will also be able to sea