How to process each element in 3 minute interval using a for loop in R?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to process each element in 3 minute interval using a for loop in R?

Takatsugu Kobayashi-2
Hi R-users,

This should be a simple question: How can I delay each loop process in some
minutes? The reason for this is I need to avoid too much traffic to get
longitudes and latitudes of 2000 addresses using google API.

I am searching for solutions with keywords like interval, minutes, delay,
but no directly relevant clues have come up yet.

Many thanks in advance.

Best,

Taka

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: How to process each element in 3 minute interval using a for loop in R?

Prof Brian Ripley
On 09/07/2014 08:17, Takatsugu Kobayashi wrote:
> Hi R-users,
>
> This should be a simple question: How can I delay each loop process in some
> minutes? The reason for this is I need to avoid too much traffic to get
> longitudes and latitudes of 2000 addresses using google API.
>
> I am searching for solutions with keywords like interval, minutes, delay,
> but no directly relevant clues have come up yet.

See ?Sys.sleep

>
> Many thanks in advance.
>
> Best,
>
> Taka


--
Brian D. Ripley,                  [hidden email]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: How to process each element in 3 minute interval using a for loop in R?

Michael Sumner-2
In reply to this post by Takatsugu Kobayashi-2
On 9 Jul 2014 17:19, "Takatsugu Kobayashi" <[hidden email]> wrote:
>
> Hi R-users,
>
> This should be a simple question: How can I delay each loop process in
some
> minutes? The reason for this is I need to avoid too much traffic to get
> longitudes and latitudes of 2000 addresses using google API.
>

R is too fast? In a loop? Preposterous!

> I am searching for solutions with keywords like interval, minutes, delay,
> but no directly relevant clues have come up yet.
>
> Many thanks in advance.
>
> Best,
>
> Taka
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] 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]]

______________________________________________
[hidden email] 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.