Hey Guys,
i am kind of confused. Under windows the system() function works great, but
not with my mac.
I have two questions:
1) What do i have to change. Using packages which require system or
eval(parse() everything is fine, but
when i try it myself "sh: cmd: command not found"
Under windows i use e.g system('cmd /c copy "bild.jpg"',intern=FALSE )
2) I really love the Hmisc/latex function and want to be able to do it
myself.
How could i save a text in my notepad as name.txt
Thank you!!
--
View this message in context: http://r.789695.n4.nabble.com/system-under-windows-x-but-not-with-Mac-tp4630688.html
Sent from the R help mailing list archive at Nabble.com.
system() under windows [x] but not with Mac
4 messages · barb, David Winsemius, Joshua Wiley +1 more
On May 20, 2012, at 6:49 PM, barb wrote:
Hey Guys,
i am kind of confused. Under windows the system() function works
great, but
not with my mac.
I have two questions:
1) What do i have to change. Using packages which require system or
eval(parse() everything is fine, but
when i try it myself "sh: cmd: command not found"
Under windows i use e.g system('cmd /c copy "bild.jpg"',intern=FALSE )
There is no 'cmd' system function in MacOSX.
system("cp q.csv q2.csv") # succeeds in making a copy of an existing
file in the working directory
2) I really love the Hmisc/latex function and want to be able to do it myself. How could i save a text in my notepad as name.txt
I do not understand what the problem is. What is meant by "do it"? What is the "notepad"?
David Winsemius, MD West Hartford, CT
On Mon, May 21, 2012 at 6:25 AM, David Winsemius <dwinsemius at comcast.net> wrote:
On May 20, 2012, at 6:49 PM, barb wrote:
Hey Guys,
i am kind of confused. Under windows the system() function works great,
but
not with my mac.
?I have two questions:
1) What do i have to change. Using packages which require system or
eval(parse() everything is fine, but
when i try it myself "sh: cmd: command not found"
Under windows i use e.g system('cmd /c copy "bild.jpg"',intern=FALSE )
There is no 'cmd' system function in MacOSX.
system("cp q.csv q2.csv") ?# succeeds in making a copy of an existing file
in the working directory
2) I really love the Hmisc/latex function and want to be able to do it myself. ? How could i save a text in my notepad as name.txt
I do not understand what the problem is. What is meant by "do it"? What is the "notepad"?
Geez, David, clearly the OP wants R to call the webcam to grab images of a notepad, perform text recognition on those images, and store the text in name.txt ...what do you mean when you say save the text in your notepad?
-- David Winsemius, MD West Hartford, CT
______________________________________________ R-help at r-project.org mailing list 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.
Joshua Wiley Ph.D. Student, Health Psychology Programmer Analyst II, Statistical Consulting Group University of California, Los Angeles https://joshuawiley.com/
The Mac does not have an application called notepad, so you can't "save a
text in [your] notepad". However, the Mac has TextEdit, and if you save
any file with the ".txt" suffix it will open in TextEdit when you
double-click on it in a Finder window (outside R, that is).
You could even, from inside R, type
system('open name.txt')
and it will open the file in TextEdit, provided that the file is in what R
considers to be your working directory.
To save a file from within R, start by viewing the help pages for
write.table
sink
cat
depending on what you want to save and how you want it structured in the
file.
-Don
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
On 5/20/12 3:49 PM, "barb" <mainzel89 at hotmail.com> wrote:
>Hey Guys,
>
>i am kind of confused. Under windows the system() function works great,
>but
>not with my mac.
> I have two questions:
>
>1) What do i have to change. Using packages which require system or
>eval(parse() everything is fine, but
>when i try it myself "sh: cmd: command not found"
>Under windows i use e.g system('cmd /c copy "bild.jpg"',intern=FALSE )
>
>2) I really love the Hmisc/latex function and want to be able to do it
>myself.
> How could i save a text in my notepad as name.txt
>
>Thank you!!
>
>
>
>--
>View this message in context:
>http://r.789695.n4.nabble.com/system-under-windows-x-but-not-with-Mac-tp46
>30688.html
>Sent from the R help mailing list archive at Nabble.com.
>
>______________________________________________
>R-help at r-project.org mailing list
>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.