[R] Suppressing script commands in R console when executing long program
Duncan Murdoch
murdoch at stats.uwo.ca
Fri Sep 18 12:29:28 CEST 2009
Ishwor wrote:
> Steve.
> Hi.
>
>
>
>> I have a script composing of more than 1000 lines and would like suppress
>> the R codes from the console when executing the script (to reduce the
>> physical processing time)
>>
>> I have tried options(echo=T) but no luck..
>>
>> *Q1. Are there any way of suppressing the commands in the R console?*
>>
>> Also, when importing spreadsheet consisting of numbers with 1,000 separator
>> commas (i.e 10000 as 10,000) into R and performing basic arithmetic, R does
>> not seem to recognise these separators..
>>
>> *Q2. Is R capable of reading numbers that are represented with 1,000
>> separator commas?*
>> **
>> Many thanks for your expertise in resolving these problems.
>>
>
> You can try putting this in your Rprofile
> options("keep.source=F")
>
> This will work in the R cmd but it will not work in the RGui
>
The syntax is wrong there: that should be options(keep.source=F). But
I don't think it addresses either question.
The normal way to execute a script from the console is
source("filename.R"), which by default doesn't echo.
I don't know the answer to Q2, but would guess that the answer is "yes";
just not sure if someone has already written the function to remove the
commas.
Duncan Murdoch
> Goodluck! :-)
>
More information about the R-help
mailing list