Displaying 20 results from an estimated 8000 matches similar to: "Varying as.Date performance"
2007 Aug 23
2
read big text file into R
Dear Rs:
Hi, I am trying to read a big text file (nrows=243440, ncols=144). It
seems the computational time of all the read methods
(scan,readtable,read.delim) is not linear to the number of rows I
want to read in: things became really slow once I tried to read in
100000 lines compare to 10000 lines).
If I am reading the profiling result right, I guess scan wouldn't
help either.
My
2004 Oct 16
3
Lazy loading... advices
Hello,
I am looking for more information about lazy loading introduced in R 2.0.0.
Doing
?lazyLoad
I got some and there is a 'see also' section that points to
'makeLazyLoading'... But I cannot reach this page.
My problem is: I recompiled a library that uses a lot of functions from
other libraries (of course I can give details if needed). I load it in my
computer: library(svGUI),
2007 Oct 22
2
Help interpreting output of Rprof
Hello there,
I am not quite sure how to interpret the output of Rprof (in the following the output I was staring at). I was poking around the web a little bit for documentation but without much success. I guess if I want to figure out what takes so long in my code the 2nd table $by.total and the total.pct column (pct = percent) is the most helpful. What does it mean that [ or [.data.frame is
2009 Nov 10
1
standardGeneric seems slow; any way to get around it?
Hi,
I'm running some routines with standard matrix operations like solve() and
diag().
When I do a profile, the lead item under total time is standardGeneric().
Furthermore, solve() and diag() have much greater total time than self time.
???
I assume there is some time-consuming decision going on in the usual
functions;
is there any way to avoid that and go straight to the calculaions?
Thanks
2005 Dec 12
2
date handling
Hi,
Given a frame with calendar date's:
"2005-07-01", "2005-07-02","2005-07-03","2005-07-04","2005-07-05",etc.
I want to extract the following from these dates:
week number
month number
year number
Any ideas how to accomplish this?
Many thanks.
Regards,
Richard
2005 Oct 25
1
performance of nchar
Hi,
Is nchar function knowingly slow in R? I'm doing some string
formatting that requires multiple call to nchar, and nchar seems to be
very slow.
Experiment 1, pass nchar inside sprintf, and it takes 0.7 seconds
> system.time(for (i in 1:10000)
+ str = sprintf('0005%020d', nchar(op))
+ )[3]
[1] 0.7
Experiment 2, get the length of op separately using nchar, and then pass
2005 Jun 13
5
slow loading with lme4
it takes a long time to load the lme4 package.anyone else encounter this problem?
> system.time(library(lme4))
佋佖伻侂佇佽佉仾伒伳伋佁伡伃伆侟仯伜Matrix
佋佖伻侂佇佽佉仾伒伳伋佁伡伃伆侟仯伜lattice
[1] 19.90 0.30 25.56 NA NA
> version
_
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status Patched
major 2
minor
2016 Apr 11
3
Query about use of format in strptime
Dear R-list users,
I need to use strptime because I have to deal with date with hours and minutes.
I read the manual for strptime and I also looked at many examples, but when I try to apply it to my code, I always encounter some problems.
I try to change the default format, with no success. Why? How can I change the format?
1.
init_day <- as.factor("2015-02-24-00-30")
2016 Apr 11
2
Query about use of format in strptime
Dear Jim and dear Enrico,
thank you for your replies.
Unfortunately your hints didn't solve my problem, and I am getting mad.
Can I show you my whole process? I will be as quick as possible.
I start from a data frame called Snow of the form
year month day hh mm hs
2007 11 19 0 0 0.00
2007 11 19 0 30 0.00
2007 11 19 1 0 0.00
2007 11 19 1 30 0.00
2007 11 19 2 0 0.00
2007 11 19 2 30 0.00
2007 11
2009 Mar 03
1
profiler and loops
Hello,
(This is follow up from this thread:
http://www.nabble.com/execution-time-of-.packages-td22304833.html but
with a different focus)
I am often confused by the result of the profiler, when a loop is
involved. Consider these two scripts:
script1:
Rprof( )
x <- numeric( )
for( i in 1:10000){
x <- c( x, rnorm(10) )
}
Rprof( NULL )
print( summaryRprof( ) )
script2:
2012 Jun 09
3
More simple implementation is slow.
Hi all.
I'm developing a function, which must return a square matrix.
Here is the code:
http://pastebin.com/THzEW9N7
These functions implement an analog of two embedded for cycles.
The first variant creates the resulting matrix by columns, cbind()-ing them
one by one.
The second variant creates the matrix with two columns, which rows contain
all possible
variants of i and j and calls apply
2016 Apr 11
0
Query about use of format in strptime
Hi Stefano,
As the help page says:
"The default for the format methods is "%Y-%m-%d %H:%M:%S" if any
element has a time component which is not midnight, and "%Y-%m-%d"
otherwise. This is because when the result is printed, it uses the
default format. If you want a specified output representation:
format(strptime(init_day, format="%Y-%m-%d-%H-%M"),"%Y-%M-%d
2009 Mar 18
2
Profiling question: string formatting extremely slow
Hi all,
I'm using R to find duplicates in a set of 6 files containing Part Number
information. Before applying the intersect method to identify the duplicates
I need to normalize the P/Ns. Converting the P/N to uppercase if
alphanumerical and applying an 18 char long zero padding if numerical.
When I apply the pn_formatting function (see code below) to "Part Number"
column of the
2007 Mar 16
1
ideas to speed up code: converting a matrix of integers to a matrix of normally distributed values
Hi all,
[this is a bit hard to describe, so if my initial description is
confusing, please try running my code below]
#WHAT I'M TRYING TO DO
I'd appreciate any help in trying to speed up some code. I've written
a script that converts a matrix of integers (usually between 1-10,000
- these represent allele names) into two new matrices of normally
distributed values (representing
2004 Apr 22
1
slower execution in R 1.9.0
I have an R function (about 1000 lines long) that takes more than 20
times as long to run under R Windows 1.9.0 and 1.8.1 than it does under
1.7.1. Profile results indicate that the $<-.data.frame operation is
the culprit, but I don't understand exactly what that is (assignment of
data frame elements to another variable?), or why it's only a problem
under 1.8.1 and 1.9.0. Any advice?
2006 Feb 01
3
format of 2x2 table
Does anyone know how I can generate a 2x2 table in a
format where in each cell of the table, it contains a)
count (frequency) b) total percentage c) row
percentage d) column percentage. SAS can generate this
format easily, is there a R package that can do this?
Frequency |
Percent |
Row Pct |
Col Pct | positive negative | Total
--------------------------------|-------
disease |
2006 Jun 14
2
Package naming best practices
R-devel,
I'm in the process of choosing a name for a new package. I've already
decided that the name will have two parts, 'portfolio' and 'sim', but
can't decide between 'portfolioSim' and 'portfolio.sim'. Is there any
good reason to choose one over the other?
Thanks in advance,
Jeff
--
Jeff Enos
Kane Capital Management
jeff at kanecap.com
2001 Nov 29
1
patch from faith@alephnull to add rate indicator to --progress
Any votes for/against?
----- Forwarded message from Rik Faith <faith@alephnull.com> -----
Date: Wed, 28 Nov 2001 12:55:29 -0500
From: Rik Faith <faith@alephnull.com>
To: mbp@samba.org
Subject: rsync patch
X-Mailer: VM 6.96; XEmacs 21.1; Linux 2.4.16 (light)
Here is a patch that adds rate information (e.g., kB/s) to the
--progress display. I just noticed that 2.4.7pre4 is coming
2015 May 04
2
Problem with adding slots to S4 object
Dear all,
I'm trying to create a virtual S4 class with some subclasses. I noticed
that adding slots to this class increases the memory use and slows the
functions down. Note that I'm adding very small slots (integer or character
both of length 1).
I've made a reproducible example at
https://github.com/ThierryO/testvirtualclass. The R CMD check --as-cran
fails on the tests.
Some of
2005 Nov 01
4
S4 classes in existing packages
R-devel,
I'm interested in looking at some examples of existing R packages that
rely heavily on S4 classes to get a feel for varying styles and
package organization techniques. Could you recommend any packages
that might serve as a good starting point?
Thanks in advance,
Jeff