Displaying 20 results from an estimated 1000 matches similar to: "Help interpreting output of Rprof"
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),
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?
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
2009 Oct 19
2
how to get rid of 2 for-loops and optimize runtime
Short: get rid of the loops I use and optimize runtime
Dear all,
I want to calculate for each row the amount of the month ago. I use a matrix with 2100 rows and 22 colums (which is still a very small matrix. nrows of other matrixes can easily be more then 100000)
Table before
Year month quarter yearmonth Service ... Amount
2009 9 Q3 092009 A ...
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
2009 Nov 19
1
problem post request with RCurl
Hi, I am trying to use a CGI service (Pubchem PUG) via RCurl and am
running into a problem where the data must be supplied via POST - but
I don't know the keyword for the argument.
The data to be sent is an XML fragment. I can do this via the command
line using curl: I save the XML string to a file called query.xml and
then do
curl -d @query.xml
2015 May 05
1
Problem with adding slots to S4 object
There are too many arguments in the signature of the my_inla generic. The
signature defaults to every argument in the formals, which are probably
already over-specified. Typically, one defines a generic with the formals
(x, ...), or perhaps in this case (x, model, ...), but more on that below
Unrelated to this issue, the my_inla generic is defined incorrectly. It
should call
2018 Feb 12
2
What does pct mean?
Hi Carsten,
On 02/11/2018 at 07:46 PM Carsten Bock wrote:
> Hi,
>
> Lost percent (%)....
Are you sure? I'm seeing here:
...........Receive......... .........Transmit..........
Count Lost Pct Jitter Count Lost Pct Jitter RTT....
188K 0 0 0.000 188K 16641K 8809 0.000 0.026
=> This doesn't sound reliable to me: there are 188K packets and 16641K
2018 Feb 13
2
What does pct mean?
On 02/13/2018 at 08:41 AM Floimair Florian wrote:
> No you're reading it wrong.
>
> There are 188K received with no loss, and 16441K transmitted.
This doesn't make any sense to me, either. There can't be more packages
transmitted than received. It's the same codec in and out and it's been
running exactly the same time.
> ...........Receive.........
2010 Sep 11
5
for loop
Hello,
I have a simple question: I want to list numbers 1:k, but if k <1, I hope nothing listed.
how should we do?
k=2
for (i in 1:k) print(i)
[1] 1 # <-correct
[1] 2
k=0
for (i in 1:k) print(i)
[1] 1 #<---- wrong
[1] 0
thanks
jian
[[alternative HTML version deleted]]
2018 Feb 13
3
What does pct mean?
Could this gap in sequence numbers caused by a codec change generate
errors like the one below?
[2018-02-13 12:57:43] WARNING[4917][C-0004c2cb] codec_sangoma.c:
[526559][g722toulaw] Got Seq 15944 but expecting 10106 (time since last
read = 0ms), dropped 5838 packets
On 02/13/2018 01:24 PM, Andres wrote:
> On 2/13/18 11:55 AM, Michael Maier wrote:
>> On 02/13/2018 at 08:41 AM Floimair
2009 Dec 02
2
Extracting vectors from a matrix (err, I think) in RMySQL
I have a query which returns a data set like so:
> salaries
yearID POS pct
1 2009 RF 203
2 2009 DH 200
3 2009 1B 198
4 2009 3B 180
5 2009 LF 169
6 2009 SS 156
7 2009 CF 148
8 2009 2B 97
9 2009 C 86
10 2008 DH 234
11 2008 1B 199
12 2008 RF 197
13 2008 3B 191
14 2008 SS 180
15 2008 CF 164
16 2008 LF 156
17 2008 2B 104
18 2008
2003 Nov 29
3
performance gap between R 1.7.1 and 1.8.0
Dear R-help,
A colleague of mine was running some code on two of our boxes, and noticed a
rather large difference in running time. We've so far isolated the problem
to the difference between R 1.7.1 and 1.8.0, but not more than that. The
exact same code took 933.5 seconds in 1.7.1, and 3594.4 seconds in 1.8.1, on
the same box.
Basically, the code calls boot() to bootstrap fitting mixture
2011 Apr 21
1
Stymied by plyr
Hello, This is my first time trying to use plyr, and I'm getting
nowhere. I have teacher ratings data (1:4), on 10 components, by
external observers and internal observers, in schools in areas. I want
to calculate the percentage of each rating given on each component, by
each type of observer, within each school, within each area. The data
look like this:
unit area ext.obs rating comp
11
2023 Oct 15
2
Create new data frame with conditional sums
Under the hood, sapply() is also a loop (at the interpreted level). As
is lapply(), etc.
-- Bert
On Sun, Oct 15, 2023 at 2:34?AM Jason Stout, M.D. <jason.stout at duke.edu> wrote:
>
> That's very helpful and instructive, thank you!
>
> Jason Stout, MD, MHS
> Box 102359-DUMC
> Durham, NC 27710
> FAX 919-681-7494
> ________________________________
> From: John
2011 Oct 12
3
Applying function to only numeric variable (plyr package?)
My data frame consists of character variables, factors, and proportions,
something like
c1 <- c("A", "B", "C", "C")
c2 <- factor(c(1, 1, 2, 2), labels = c("Y","N"))
x <- c(0.5234, 0.6919, 0.2307, 0.1160)
y <- c(0.9251, 0.7616, 0.3624, 0.4462)
df <- data.frame(c1, c2, x, y)
pct <- function(x) round(100*x, 1)
I want to
2018 Feb 11
2
What does pct mean?
Hello,
could somebody please tell me the meaning of "Pct" as seen in asterisk cli:
...........Receive......... .........Transmit..........
Count Lost Pct Jitter Count Lost Pct Jitter RTT....
Thanks,
Michael
2013 Mar 28
1
make R program faster
Hi
there are some good tips in "The R Inferno"
http://www.burns-stat.com/documents/books/the-r-inferno/
or connect C++ to R with Rcpp
http://dirk.eddelbuettel.com/code/rcpp.html
or byte code compiler (library(compiler))
or library(data.table)
but do you have an idea to fasten standard R source code, with the
following Rprof output
self.time self.pct total.time
2023 Oct 14
2
Create new data frame with conditional sums
Well, here's one way to do it:
(dat is your example data frame)
Cutoff <- seq(0, .15, .01)
Pop <- with(dat, sapply(Cutoff, \(p)sum(Totpop[Pct >= p])))
I think there must be a more efficient way to do it with cumsum(), though.
Cheers,
Bert
On Sat, Oct 14, 2023 at 12:53?AM Jason Stout, M.D. <jason.stout at duke.edu> wrote:
>
> This seems like it should be simple but I
2023 Oct 14
1
Create new data frame with conditional sums
That's very helpful and instructive, thank you!
Jason Stout, MD, MHS
Box 102359-DUMC
Durham, NC 27710
FAX 919-681-7494
________________________________
From: John Fox <jfox at mcmaster.ca>
Sent: Saturday, October 14, 2023 10:13 AM
To: Jason Stout, M.D. <jason.stout at duke.edu>
Cc: r-help at r-project.org <r-help at r-project.org>
Subject: Re: [R] Create new data frame with