[R] Zoo seems to be running slow in R 2.8.0 windows

stephen sefick ssefick at gmail.com
Tue Nov 4 19:48:24 CET 2008


2.3-24 chron and 1.5-4 zoo
in both 2.8 and 2.7.2

On Tue, Nov 4, 2008 at 1:43 PM, Gabor Grothendieck
<ggrothendieck at gmail.com> wrote:
> One other question.  Are you running the same version of the chron
> package on both 2.7.2 and 2.8.0?
>
> packageDescription("chron")$Version
>
> will tell you.   If there is a version difference does changing the
> chron version change the performance?
>
> On Tue, Nov 4, 2008 at 1:37 PM, Gabor Grothendieck
> <ggrothendieck at gmail.com> wrote:
>> On Tue, Nov 4, 2008 at 1:06 PM, stephen sefick <ssefick at gmail.com> wrote:
>>> this should be right- I have looked at it with summaryRprof() and it
>>> is spending most of its time on things I would expect...
>>> read.production and read.zoo.  Is this the best way to communicate the
>>
>> It indicates that chron's [.times is where a lot of time is being spent.
>> Try reading in the data using POSIXct rather than chron/times and see
>> if you get a speedup.  Specify tz= and format= in read.zoo in order to do that.
>> The percent codes for format= are in ?strptime .  You can issue the
>> R command:
>>   Sys.setenv(TZ = "GMT")
>> first to avoid time zone problems.
>>
>>> results?  Or do you want it copy and pasted into the email?
>>> thank you very much
>>
>> attaching Rprof.out and pasting the output of summaryRprof() into your
>> mail message should be adequate.
>>
>>>
>>> On Tue, Nov 4, 2008 at 1:01 PM, Gabor Grothendieck
>>> <ggrothendieck at gmail.com> wrote:
>>>> Here is the output:
>>>>
>>>>> summaryRprof()
>>>> $by.self
>>>>                            self.time self.pct total.time total.pct
>>>> index.search                     0.30     55.6       0.30      55.6
>>>> .C                               0.18     33.3       0.18      33.3
>>>> inDL                             0.06     11.1       0.06      11.1
>>>> ?                                0.00      0.0       0.30      55.6
>>>> eval                             0.00      0.0       0.30      55.6
>>>> FUN                              0.00      0.0       0.30      55.6
>>>> help                             0.00      0.0       0.30      55.6
>>>> lapply                           0.00      0.0       0.30      55.6
>>>> sapply                           0.00      0.0       0.30      55.6
>>>> print                            0.00      0.0       0.24      44.4
>>>> print.help_files_with_topic      0.00      0.0       0.24      44.4
>>>> dyn.load                         0.00      0.0       0.06      11.1
>>>>
>>>> $by.total
>>>>                            total.time total.pct self.time self.pct
>>>> index.search                      0.30      55.6      0.30     55.6
>>>> ?                                 0.30      55.6      0.00      0.0
>>>> eval                              0.30      55.6      0.00      0.0
>>>> FUN                               0.30      55.6      0.00      0.0
>>>> help                              0.30      55.6      0.00      0.0
>>>> lapply                            0.30      55.6      0.00      0.0
>>>> sapply                            0.30      55.6      0.00      0.0
>>>> print                             0.24      44.4      0.00      0.0
>>>> print.help_files_with_topic       0.24      44.4      0.00      0.0
>>>> .C                                0.18      33.3      0.18     33.3
>>>> inDL                              0.06      11.1      0.06     11.1
>>>> dyn.load                          0.06      11.1      0.00      0.0
>>>>
>>>> $sampling.time
>>>> [1] 0.54
>>>>
>>>>
>>>>
>>>> On Tue, Nov 4, 2008 at 12:53 PM, Gabor Grothendieck
>>>> <ggrothendieck at gmail.com> wrote:
>>>>> Are you sure?
>>>>>
>>>>> summaryRprof()
>>>>>
>>>>> says that based on your Rprof.out file that 55% of the time is being spent
>>>>> in index.search which is for searching help files.
>>>>>
>>>>>
>>>>> On Tue, Nov 4, 2008 at 12:36 PM, stephen sefick <ssefick at gmail.com> wrote:
>>>>>> this is from the read.production command
>>>>>>
>>>>>> On Tue, Nov 4, 2008 at 12:09 PM, Gabor Grothendieck
>>>>>> <ggrothendieck at gmail.com> wrote:
>>>>>>> See ?Rprof
>>>>>>>
>>>>>>> On Tue, Nov 4, 2008 at 12:01 PM, stephen sefick <ssefick at gmail.com> wrote:
>>>>>>>> R version 2.8.0 (2008-10-20)
>>>>>>>> i386-pc-mingw32
>>>>>>>>
>>>>>>>> locale:
>>>>>>>> LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
>>>>>>>> States.1252;LC_MONETARY=English_United
>>>>>>>> States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252
>>>>>>>>
>>>>>>>> attached base packages:
>>>>>>>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>>>>>>>
>>>>>>>> other attached packages:
>>>>>>>> [1] StreamMetabolism_0.01 chron_2.3-24          zoo_1.5-4
>>>>>>>>
>>>>>>>> loaded via a namespace (and not attached):
>>>>>>>> [1] grid_2.8.0      lattice_0.17-15
>>>>>>>>
>>>>>>>>
>>>>>>>> I have a large data set that I have been reading in the same way
>>>>>>>> read.production() from the StreamMetabolism package and it has worked
>>>>>>>> in the past without a hitch
>>>>>>>>
>>>>>>>> ##########code provided#############
>>>>>>>> read.production <- function(data) { read.zoo(data, sep = ",", FUN =
>>>>>>>> fmt.chron, header = TRUE)}
>>>>>>>>
>>>>>>>> fmt.chron <- function (x) {chron(sub(" .*", "", x), gsub(".* (.*)",
>>>>>>>> "\\1:00", x))}
>>>>>>>>
>>>>>>>> this is the first time that I have used this data since the upgrade to
>>>>>>>> 2.8 and it is taking longer to preform operations.  What can I do to
>>>>>>>> help diagnose the problem.  I know this is not reproducible, but I
>>>>>>>> don't know without sharing the entire data set how to do that.
>>>>>>>> Thanks in advance
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Stephen Sefick
>>>>>>>> Research Scientist
>>>>>>>> Southeastern Natural Sciences Academy
>>>>>>>>
>>>>>>>> Let's not spend our time and resources thinking about things that are
>>>>>>>> so little or so large that all they really do for us is puff us up and
>>>>>>>> make us feel like gods.  We are mammals, and have not exhausted the
>>>>>>>> annoying little problems of being mammals.
>>>>>>>>
>>>>>>>>                                                                -K. Mullis
>>>>>>>>
>>>>>>>> ______________________________________________
>>>>>>>> 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.
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Stephen Sefick
>>>>>> Research Scientist
>>>>>> Southeastern Natural Sciences Academy
>>>>>>
>>>>>> Let's not spend our time and resources thinking about things that are
>>>>>> so little or so large that all they really do for us is puff us up and
>>>>>> make us feel like gods.  We are mammals, and have not exhausted the
>>>>>> annoying little problems of being mammals.
>>>>>>
>>>>>>                                                                -K. Mullis
>>>>>>
>>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Stephen Sefick
>>> Research Scientist
>>> Southeastern Natural Sciences Academy
>>>
>>> Let's not spend our time and resources thinking about things that are
>>> so little or so large that all they really do for us is puff us up and
>>> make us feel like gods.  We are mammals, and have not exhausted the
>>> annoying little problems of being mammals.
>>>
>>>                                                                -K. Mullis
>>>
>>
>



-- 
Stephen Sefick
Research Scientist
Southeastern Natural Sciences Academy

Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us feel like gods.  We are mammals, and have not exhausted the
annoying little problems of being mammals.

								-K. Mullis



More information about the R-help mailing list