I am trying to use the sas.get function to bring a SAS dataset into R. After calling the sas.get function I got an error message stating that 'sas' is not a recognized internal or external command, etc. I am guessing that I need to specify the internal command to invoke SAS in the sasprog option for the sas.get function, but I don't know how to determine what that command might be. Any thoughts would be appreciated. Cody Hamilton, Ph.D Institute for Health Care Research and Improvement Baylor Health Care System (214) 265-3618 This e-mail, facsimile, or letter and any files or attachments transmitted with it contains information that is confidential and privileged. This information is intended only for the use of the individual(s) and entity(ies) to whom it is addressed. If you are the intended recipient, further disclosures are prohibited without proper authorization. If you are not the intended recipient, any disclosure, copying, printing, or use of this information is strictly prohibited and possibly a violation of federal or state law and regulations. If you have received this information in error, please notify Baylor Health Care System immediately at 1-866-402-1661 or via e-mail at privacy@baylorhealth.edu. Baylor Health Care System, its subsidiaries, and affiliates hereby claim all applicable privileges related to this information. [[alternative HTML version deleted]]
Hamilton, Cody wrote:> I am trying to use the sas.get function to bring a SAS dataset into R. > After calling the sas.get function I got an error message stating that > 'sas' is not a recognized internal or external command, etc. I am > guessing that I need to specify the internal command to invoke SAS in > the sasprog option for the sas.get function, but I don't know how to > determine what that command might be. Any thoughts would be > appreciated. > >What is sas.get()? If you are talking about read.ssd() in package "foreign", you have to specify the path to the sas executable. If you are on Windows (your mail header suggests, but you have not told it), this might begin with "c:/Program files/........." unless you have sas in your PATH already. Uwe Ligges> > Cody Hamilton, Ph.D > > Institute for Health Care Research and Improvement > > Baylor Health Care System > > (214) 265-3618 > > > > > > This e-mail, facsimile, or letter and any files or attachments transmitted with it contains information that is confidential and privileged. This information is intended only for the use of the individual(s) and entity(ies) to whom it is addressed. If you are the intended recipient, further disclosures are prohibited without proper authorization. If you are not the intended recipient, any disclosure, copying, printing, or use of this information is strictly prohibited and possibly a violation of federal or state law and regulations. If you have received this information in error, please notify Baylor Health Care System immediately at 1-866-402-1661 or via e-mail at privacy at baylorhealth.edu. Baylor Health Care System, its subsidiaries, and affiliates hereby claim all applicable privileges related to this information. > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
I'm speculating, but you might need to substitute "Progra~1" for "Program Files" in the path. Andy From: Hamilton, Cody> > Thanks for your response. I specified the path to the SAS > executable 'C:/Program Files/.../sas.exe', using the sasprog > option in sas.get() and got a similar error message: > C:/Program is not recognized as an internal or external > command. I would like to apologize in advance if I am making > a very foolish mistake here . . . > > -----Original Message----- > From: Uwe Ligges [mailto:ligges at statistik.uni-dortmund.de] > Sent: Wednesday, July 05, 2006 13:7 PM > To: Hamilton, Cody > Cc: r-help at stat.math.ethz.ch > Subject: Re: [R] Invoking SAS in order to use sas.get > > Hamilton, Cody wrote: > > Sas.get is a function available from the Hmisc library. I am using > > Windows (sorry for not mentioning that). > > > Same as mentioned in my former mail also applies for > sas.get() in Hmisc. > > Uwe Ligges > > > > -----Original Message----- > > From: Uwe Ligges [mailto:ligges at statistik.uni-dortmund.de] > > > > Sent: Wednesday, July 05, 2006 12:35 PM > > To: Hamilton, Cody > > Cc: r-help at stat.math.ethz.ch > > Subject: Re: [R] Invoking SAS in order to use sas.get > > > > Hamilton, Cody wrote: > >> I am trying to use the sas.get function to bring a SAS dataset into > R. > >> After calling the sas.get function I got an error message stating > that > >> 'sas' is not a recognized internal or external command, etc. I am > >> guessing that I need to specify the internal command to > invoke SAS in > >> the sasprog option for the sas.get function, but I don't > know how to > >> determine what that command might be. Any thoughts would be > >> appreciated. > >> > > > > > > What is sas.get()? > > If you are talking about read.ssd() in package "foreign", > you have to > > > > specify the path to the sas executable. If you are on Windows (your > mail > > > > header suggests, but you have not told it), this might begin with > > > > "c:/Program files/........." unless you have sas in your > PATH already. > > > > Uwe Ligges > > > > > > > > > >> Cody Hamilton, Ph.D > >> > > > >> Institute for Health Care Research and Improvement > >> > > > >> Baylor Health Care System > >> > > > >> (214) 265-3618 > >> > > > > > > > > > > > >> This e-mail, facsimile, or letter and any files or attachments > > transmitted with it contains information that is confidential and > > privileged. This information is intended only for the use of the > > individual(s) and entity(ies) to whom it is addressed. If > you are the > > intended recipient, further disclosures are prohibited > without proper > > authorization. If you are not the intended recipient, any > disclosure, > > copying, printing, or use of this information is strictly prohibited > and > > possibly a violation of federal or state law and > regulations. If you > > have received this information in error, please notify > Baylor Health > > Care System immediately at 1-866-402-1661 or via e-mail at > > privacy at baylorhealth.edu. Baylor Health Care System, its > subsidiaries, > > and affiliates hereby claim all applicable privileges > related to this > > information. > >> [[alternative HTML version deleted]] > >> > > > >> ______________________________________________ > >> R-help at stat.math.ethz.ch mailing list > >> https://stat.ethz.ch/mailman/listinfo/r-help > >> PLEASE do read the posting guide! > > http://www.R-project.org/posting-guide.html > > > > > > This e-mail, facsimile, or letter and any files or attachments > transmitted with it contains information that is confidential > and privileged. This information is intended only for the use of the > individual(s) and entity(ies) to whom it is addressed. If you > are the intended recipient, further disclosures are > prohibited without proper authorization. If you are not the > intended recipient, any disclosure, copying, printing, or use > of this information is strictly prohibited and possibly a > violation of federal or state law and regulations. If you > have received this information in error, please notify Baylor > Health Care System immediately at 1-866-402-1661 or via > e-mail at privacy at baylorhealth.edu. Baylor Health Care > System, its subsidiaries, and affiliates hereby claim all > applicable privileges related to this information. > > > This e-mail, facsimile, or letter and any files or > attachments transmitted with it contains information that is > confidential and privileged. This information is intended > only for the use of the individual(s) and entity(ies) to whom > it is addressed. If you are the intended recipient, further > disclosures are prohibited without proper authorization. If > you are not the intended recipient, any disclosure, copying, > printing, or use of this information is strictly prohibited > and possibly a violation of federal or state law and > regulations. If you have received this information in error, > please notify Baylor Health Care System immediately at > 1-866-402-1661 or via e-mail at privacy at baylorhealth.edu. > Baylor Health Care System, its subsidiaries, and affiliates > hereby claim all applicable privileges related to this information. > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > >
> -----Original Message----- > From: r-help-bounces at stat.math.ethz.ch [mailto:r-help- > bounces at stat.math.ethz.ch] On Behalf Of Hamilton, Cody > Sent: Wednesday, July 05, 2006 11:18 AM > To: Uwe Ligges > Cc: r-help at stat.math.ethz.ch > Subject: Re: [R] Invoking SAS in order to use sas.get > > > Thanks for your response. I specified the path to the SAS executable > 'C:/Program Files/.../sas.exe', using the sasprog option in sas.get() > and got a similar error message: C:/Program is not recognized as an > internal or external command. I would like to apologize in advance if I > am making a very foolish mistake here . . . > > -----Original Message----- > From: Uwe Ligges [mailto:ligges at statistik.uni-dortmund.de] > Sent: Wednesday, July 05, 2006 13:7 PM > To: Hamilton, Cody > Cc: r-help at stat.math.ethz.ch > Subject: Re: [R] Invoking SAS in order to use sas.get > > Hamilton, Cody wrote: > > Sas.get is a function available from the Hmisc library. I am using > > Windows (sorry for not mentioning that). > > > Same as mentioned in my former mail also applies for sas.get() in Hmisc. > > Uwe Ligges > > > > -----Original Message----- > > From: Uwe Ligges [mailto:ligges at statistik.uni-dortmund.de] > > > > Sent: Wednesday, July 05, 2006 12:35 PM > > To: Hamilton, Cody > > Cc: r-help at stat.math.ethz.ch > > Subject: Re: [R] Invoking SAS in order to use sas.get > > > > Hamilton, Cody wrote: > >> I am trying to use the sas.get function to bring a SAS dataset into > R. > >> After calling the sas.get function I got an error message stating > that > >> 'sas' is not a recognized internal or external command, etc. I am > >> guessing that I need to specify the internal command to invoke SAS in > >> the sasprog option for the sas.get function, but I don't know how to > >> determine what that command might be. Any thoughts would be > >> appreciated. > >> > > > > > > What is sas.get()? > > If you are talking about read.ssd() in package "foreign", you have to > > > > specify the path to the sas executable. If you are on Windows (your > mail > > > > header suggests, but you have not told it), this might begin with > > > > "c:/Program files/........." unless you have sas in your PATH already. > > > > Uwe Ligges > > > > > > > > > >> Cody Hamilton, Ph.D > >> > > > >> Institute for Health Care Research and Improvement > >> > > > >> Baylor Health Care System > >> > > > >> (214) 265-3618 > >> > > > > > > > > > > > >> This e-mail, facsimile, or letter and any files or attachments > > transmitted with it contains information that is confidential and > > privileged. This information is intended only for the use of the > > individual(s) and entity(ies) to whom it is addressed. If you are the > > intended recipient, further disclosures are prohibited without proper > > authorization. If you are not the intended recipient, any disclosure, > > copying, printing, or use of this information is strictly prohibited > and > > possibly a violation of federal or state law and regulations. If you > > have received this information in error, please notify Baylor Health > > Care System immediately at 1-866-402-1661 or via e-mail at > > privacy at baylorhealth.edu. Baylor Health Care System, its subsidiaries, > > and affiliates hereby claim all applicable privileges related to this > > information. > >> [[alternative HTML version deleted]] > >> > > > >> ______________________________________________ > >> R-help at stat.math.ethz.ch mailing list > >> https://stat.ethz.ch/mailman/listinfo/r-help > >> PLEASE do read the posting guide! > > http://www.R-project.org/posting-guide.html > > > > > > This e-mail, facsimile, or letter and any files or attachments > transmitted with it contains information that is confidential and > privileged. This information is intended only for the use of the > individual(s) and entity(ies) to whom it is addressed. If you are the > intended recipient, further disclosures are prohibited without proper > authorization. If you are not the intended recipient, any disclosure, > copying, printing, or use of this information is strictly prohibited and > possibly a violation of federal or state law and regulations. If you > have received this information in error, please notify Baylor Health > Care System immediately at 1-866-402-1661 or via e-mail at > privacy at baylorhealth.edu. Baylor Health Care System, its subsidiaries, > and affiliates hereby claim all applicable privileges related to this > information. > > > This e-mail, facsimile, or letter and any files or attachments transmitted > with it contains information that is confidential and privileged. This > information is intended only for the use of the individual(s) and > entity(ies) to whom it is addressed. If you are the intended recipient, > further disclosures are prohibited without proper authorization. If you > are not the intended recipient, any disclosure, copying, printing, or use > of this information is strictly prohibited and possibly a violation of > federal or state law and regulations. If you have received this > information in error, please notify Baylor Health Care System immediately > at 1-866-402-1661 or via e-mail at privacy at baylorhealth.edu. Baylor Health > Care System, its subsidiaries, and affiliates hereby claim all applicable > privileges related to this information. > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting- > guide.htmlBecause your path has a space in it, i.e. "c:\Program Files\...", Windows requires quotes around the path\filename. So, you need to include double-quotes as part of your path specification. Some thing like: '"C:/Program Files/.../sas.exe"' Hope this helps, Dan Daniel J. Nordlund Research and Data Analysis Washington State Department of Social and Health Services Olympia, WA 98504-5204