[R] system.time

jim holtman jholtman at gmail.com
Mon Nov 28 10:50:39 CET 2011


This is an indication of the amount of CPU resources that you are
using.  Elapsed time is just the number of seconds that the R process
(e.g., RGUI) has been running.  "user" time is the amount of CPU that
any commands/scripts have used that you are running; this is the one
that you are typically interested in.  'system' time is the amount of
CPU that the operating system has used to run your script; in most
cases this should be a lot less than 'user'.  The reason is might be
high is if you are doing a lot of I/O, or running short of physical
memory and having to 'page' parts of it to disk.  For a CPU intensive
application, I like user:system to be at least 10:1.

"sprinkle" proc.time() throughout your code (actually
print(proc.time() so you get output when running a script or in a
function).  You will have to determine what the characteristics are
for your script/application.

On Mon, Nov 28, 2011 at 12:50 AM, Jorge I Velez
<jorgeivanvelez at gmail.com> wrote:
> Hi Vikram,
>
> Check ?system.time and ?proc.time.
>
> HTH,
> Jorge.-
>
>
> On Mon, Nov 28, 2011 at 12:41 AM, Vikram Bahure <> wrote:
>
>> Dear R users.
>>
>> I wanted to know, how do we read the output of system.time. It would be
>> helpful if you could let me know what are user system and elapsed.
>>
>> Regards
>> Vikram
>>
>>        [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> 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.
>>
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>



-- 
Jim Holtman
Data Munger Guru

What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.



More information about the R-help mailing list