Displaying 5 results from an estimated 5 matches for "mcap".
Did you mean:
map
2005 Aug 03
2
using weighted.mean with tapply()
I am trying to calculate the weighted mean for a of 10 deciles and I
get an error:
> decile <- tapply(X=mat$trt1m, INDEX=mat$Rank, FUN=weighted.mean, w=mat$mcap)
Error in FUN(X[[1]], ...) : 'x' and 'w' must have the same length
All three of my inputs have the same length, as shown below, and the
weighted.mean calculation works by itself, just not in tapply()
> length(mat$Rank)
[1] 1853
> length(mat$mcap)
[1] 1853
> length(mat$trt...
2011 Feb 16
1
confused by lapply
...not what I see:
parse.num <- function (s) {
cat("parse.num1\n"); str(s)
s <- as.character(s)
cat("parse.num2\n"); str(s)
if (s == "N/A") return(s);
as.numeric(gsub("M$","e6",gsub("B$","e9",s)));
}
> vec
mcap
1 200.5B
2 19.1M
3 223.7B
4 888.0M
5 141.7B
6 273.5M
7 55.649B
> str(vec)
'data.frame': 7 obs. of 1 variable:
$ mcap: Factor w/ 7 levels "141.7B","19.1M",..: 3 2 4 7 1 5 6
> vec<-lapply(vec,parse.num)
parse.num1
Factor w/ 7 levels "141.7B",&q...
2007 May 14
6
Conditional Sums for Index creation
Hi,
Apologies for the long mail. I have a data.frame with columns of
price/mcap data for a portfolio of stocks, and the date. To get the
total value of the portfolio on a daily basis, I calculate rowSums of
the data.frame.
> set.seed(1)
> ab <- matrix(round(runif(100)*100),nrow=20,ncol=5)
> ab[1:5,4:5] <- NA
> ab[6:10,5] <- NA
> ac <- as.data.frame...
2006 Mar 28
0
~/.mime.types - format conflict with standard /etc/mime.types?
...hose listed here.
<snip>
application/futuresplash spl
application/ghostview
application/hta hta
<snip>
However, the format of wine's (or cxoffice's) ~/.mime.types file is
completely diffferent:
<snip>
#
X-Created-By-mcap-cxoffice-ff120fd1-93c5-4bef-8da1-b9ecff669032:text_h323=text_h323
type=application/x-crossover-ade \
desc=Microsoft Access Project Extension \
exts="ade"
<snip>
(Sorry about line wraps. The "# X-Created-By" is one line, and the
"type=", "desc=" and &q...
2009 Sep 11
1
Asterisk & Faxing
Greetings!
I have Asterisk 1.4.25.1 running as a Xen virtual machine using 64-bit
domU and Dom0 with faxing and was curious about other users' experiences
with it. So far receiving fax works just fine, but I'm curious if
anyone else is doing international faxing with asterisk. If yes, could
you please post your experiences? Were there any issues you may have
encountered that I