Re: [R] help with function "system" and MS-DOS command TYPE

2007-01-31 Thread Chen, Xiao
Dear R-Help, Thanks much. I have received very good advice from a couple of experts. R-help is just wonderful! I have combined all the solutions that I got and they are shown below: zz<-file("d:/work/test/test.txt", "w") cat("this is a test\n", file=zz) close(zz) setwd("d:/work/test") shell

Re: [R] help with function "system" and MS-DOS command TYPE

2007-01-31 Thread Prof Brian Ripley
On Wed, 31 Jan 2007, Vladimir Eremeev wrote: > Chen, Xiao wrote: >> >> Greetings - >> >> I have a quick question that I hope someone will have a quick answer. I >> have tried to use the R function "system" with the MS-DOS command "type" >> to display the full content of a text file. But it always

Re: [R] help with function "system" and MS-DOS command TYPE

2007-01-31 Thread jim holtman
Try 'file.show' On 1/30/07, Chen, Xiao <[EMAIL PROTECTED]> wrote: > Greetings - > > I have a quick question that I hope someone will have a quick answer. I > have tried to use the R function "system" with the MS-DOS command "type" > to display the full content of a text file. But it always returns

Re: [R] help with function "system" and MS-DOS command TYPE

2007-01-31 Thread Vladimir Eremeev
type test.txt", show.output.on.console=T) > test.txt not found > type is an internal command, rather than an executable file use system("cmd /c type test.txt", show.output.on.console=T) or system("command /c type test.txt", show.output.on.console=T) -- V

[R] help with function "system" and MS-DOS command TYPE

2007-01-30 Thread Chen, Xiao
Greetings - I have a quick question that I hope someone will have a quick answer. I have tried to use the R function "system" with the MS-DOS command "type" to display the full content of a text file. But it always returns with a message saying the text file is not found. I could accomplish the sa

Re: [R] help with function

2006-09-20 Thread Mike Nielsen
Take the case of i==1. Ct[i]<-1/Bq*Bt[i]*Cerr # Assign Ct[1] using Bt[1] Rt[i]<-Bt[i]/(a+b*Bt[i]) # Assign Rt[1] using Bt[1] Bt[i+2]<-(1-m)*Bt[i+1]+Rt[i] *Rerr-Ct[i+1] # Assign Bt[3] using Bt[2] and Rt[1] and **Ct[2]** You're

[R] help with function

2006-09-20 Thread Guenther, Cameron
Hello everyone, I have a function here that I wrote but doesn't seem to work quite right. Attached is the code. In the calib funcion under the for loop Bt[i+2]<-(1-m)*Bt[i+1]+Rt[i]*Rerr-Ct[i+1] returns NA's for everything after years 1983 and 1984. However the code works when it reads Bt[i+2]<-