search for: pct

Displaying 20 results from an estimated 164 matches for "pct".

Did you mean: pci
2009 Nov 19
1
problem post request with RCurl
....gov/pug/pug.cgi" I get the expected response. More importantly, the verbose option shows: > Accept: */* > Content-Length: 1227 > Content-Type: application/x-www-form-urlencoded However, when I try to do this via RCurl, the data doesn't seem to get sent: q <- "<PCT-Data> <PCT-Data_input> <PCT-InputData> <PCT- InputData_query> <PCT-Query> <PCT- Query_type> <PCT-QueryType> <PCT- QueryType_qas> <PCT- QueryActivitySummary> <PC...
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 of them are lost?! The Pct value is fluctuating between about 6009 and 9009. Thanks, Michael > > &...
2018 Feb 13
2
What does pct mean?
...s, 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......... .........Transmit.......... > Count Lost Pct Jitter Count Lost Pct Jitter RTT.... > 188K 0 0 0.000 188K 16641K 8809 0.000 0.026 ^^^^ ^^^^ There are 188K received and 188K transmitted. Pct is unknown - what's Pct? > > Still 8809 does not sound like a percentage to me ? so th...
2018 Feb 13
3
What does pct mean?
...re 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. > Lost and Percent (pct) are not calculated by counting packets. Those > are calculated from the sequence numbers in the RTP frame. > > For example let's say you start the receiver (Asterisk) at Sequence > #1....then something happens and it jumps to sequence #5000.? The > audio might be fine, but no...
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...
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
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]]
2023 Oct 15
2
Create new data frame with conditional sums
...ong with using a loop to solve > this problem, but it's generally a good idea to pre-allocate space for > the result rather than build it up one value at a time, which may cause > unnecessary copying of the object. > > Here are three solutions: > > f1 <- function(Cutoff, Pct, Totpop){ > Pop <- numeric(0) > for (i in seq_along(Cutoff)) > Pop[i] <- sum(Totpop[Pct >= Cutoff[i]]) > cbind(Cutoff, Pop) > } > > f2 <- function(Cutoff, Pct, Totpop){ > Pop <- numeric(length(Cutoff)) > for (i in seq_along(Cutoff)) >...
2023 Oct 14
1
Create new data frame with conditional sums
...hink that there's anything wrong with using a loop to solve this problem, but it's generally a good idea to pre-allocate space for the result rather than build it up one value at a time, which may cause unnecessary copying of the object. Here are three solutions: f1 <- function(Cutoff, Pct, Totpop){ Pop <- numeric(0) for (i in seq_along(Cutoff)) Pop[i] <- sum(Totpop[Pct >= Cutoff[i]]) cbind(Cutoff, Pop) } f2 <- function(Cutoff, Pct, Totpop){ Pop <- numeric(length(Cutoff)) for (i in seq_along(Cutoff)) Pop[i] <- sum(Totpop[Pct >= Cutoff[i]...
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 can't get it to work properly. I'm starting w...
2011 Oct 12
3
Applying function to only numeric variable (plyr package?)
...tors, 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 apply the pct function to only the numeric variables so that the proportions are computed to percentages, and retain all the columns: c1 c2 x1 x2 1 A Y 52.3 92.5 2 B Y 69.2 76.2 3 C N 23.1 36.2 4 C N 11.6 44.6 I've been approaching it...
2007 Aug 23
2
read big text file into R
...get around this?: I can't just sit around for 15 mins. Would write a c function help? Thanks! Here is the profiling I did: > Rprof() > dd = read.delim(file,skip=9,sep="\t",as.is= T,nrows=10000) > Rprof(NULL) > summaryRprof() $by.self self.time self.pct total.time total.pct "scan" 3.56 85.2 3.56 85.2 "type.convert" 0.48 11.5 0.48 11.5 "read.table" 0.08 1.9 4.18 100.0 "make.names" 0.02 0.5 0.02 0.5 "options&quot...
2009 Mar 03
1
profiler and loops
...rnorm(10) ) } Rprof( NULL ) print( summaryRprof( ) ) script2: Rprof( ) ffor <- function(){ x <- numeric( ) for( i in 1:10000){ x <- c( x, rnorm(10) ) } } ffor() Rprof( NULL ) print( summaryRprof( ) ) []$ time Rscript --vanilla script1.R $by.self self.time self.pct total.time total.pct "rnorm" 0.22 100 0.22 100 $by.total total.time total.pct self.time self.pct "rnorm" 0.22 100 0.22 100 $sampling.time [1] 0.22 real 0m7.786s user 0m5.192s sys 0m0.735s []$$ time Rscript --vanill...
2002 Oct 25
1
reshape: duplicate rows to multiple cols
I have a dataframe that I'm trying to reshape, and need advice. My data: > klam.merge[200:225,] stream lulc x sumlength pct.lgth 200 1223030419685 92 0.25000000 9.89 2.52780586 201 1223030419686 23 0.00274154 4.73 0.05796068 202 1223030419686 41 0.75009917 4.73 15.85833341 203 1223030419686 42 2.65000000 4.73 56.02536998 204 1223030419686 43 0.11715929 4.73 2.47694058 205 1223030419...
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
2023 Oct 16
1
Create new data frame with conditional sums
If one makes the reasonable assumption that Pct is much larger than Cutoff, sorting Cutoff is the expensive part e.g O(nlog2(n) for Quicksort (n = length Cutoff). I believe looping is O(n^2). Jeff's approach using findInterval may be faster. Of course implementation details matter. -- Bert On Mon, Oct 16, 2023 at 4:41?AM Leonard Mada <...
2006 Jul 20
2
Correspondence analysis with R -follow up
...cca from vegan library, and dudi.coa from ade4 library; one last question: my deal is mainly with contingency tables, like the one i'm posting here acciaieria<-c(.41,.02,.44,.04,.09) laminatoio<-c(.34,.28,.26,.01,.11) fonderia<-c(.48,.05,.34,.08,.05) leghe<-c(.45,.19,.25,.03,.08) pct<-cbind(acciaieria,laminatoio,fonderia,leghe) pct<-data.frame(pct,row.names=c("normale","preparaz.","manutenz.","installaz.","trasferim.")) BUT...cca and dudi.coa seem to return quite different graphical results; where am i doing wrong? Do th...
2009 May 19
1
panel question (plm)
...8, data=plmWithDensity) Error: subscript out of bounds I am not understanding the "subscript out of bounds" error, as this is a balanced panel and there are no holes in the data set. Any help would be very much appreciated. The model I am trying to run is > model2 <- plm(RATE~ AGR.PCT+SVC.PCT+IND.PCT+density08, data=plmWithDensity) This code runs fine, but I do not get any coefficients for density08 > summary(model2) Oneway (individual) effect Within Model Call: plm(formula = RATE ~ AGR.PCT + SVC.PCT + IND.PCT + density08, data = plmWithDensity) Balanced Panel: n=89,...
2011 Dec 09
0
Summary model with observations taken out and dummied back in - not working
...(not entirely sure on the reason, but have been told I should try). I have used this in order to do it, but I am not getting any statistical analysis with my dummy it's all NA. > dummy15=rep(0, times=n) > dummy15[15]=1 > which(psubset1==0) [1] 10 15 21 27 > dummytest = lm(price ~ pct.children + wealth + pct.walk + pct.emp + > dummy15, data = mydata, *subset = as.logical(subset)*) > summary(dummytest) Call: lm(formula = price ~ pct.children + wealth + pct.walk + pct.emp + dummy15, data = mydata, *subset = as.logical(subset)*) Residuals: Min 1Q Median 3Q...
2011 Jun 17
1
is this a bug?
Hello, Is the following a bug? I always thought that df$varname <- does the same as df["varname"] <- > df <- data.frame(weight=round(runif(10, 10, 100)), sex=round(runif(100, 0, 1))) > df$pct <- df["weight"] / ave(df["weight"], df["sex"], FUN=sum)*100 > names(df) [1] "weight" "sex" "pct" ### ----------> ok > head(df) weight sex weight ### ----------> huh!?! 1 86 0 2.4002233 2 19 1 0.56430...