Displaying 20 results from an estimated 400 matches similar to: "Aggregate() questions"
2008 May 28
1
Grouped weighted.mean
Dear all --
I want to compute weighted.mean() for grouped rows.
Data frame extract is just below. For each Key, I want the mean of
IAC weighted by Wt.
DP0[1:20,]
Key
IAC Wt
2 C3-PD030020050.PD030020050.3.12.3.0 0.765 0.8590000
3 C3-PD030020050.PD030020050.3.12.3.0 0.764 0.8449651
4 C3-PD030020050.PD030020050.3.12.3.0
2008 May 30
1
Aggregation and the meaning of class
Dear R-ers,
My aggregation saga continues.
Using the following sequence, I can calculate any statistic for row
groups and merge the result back to all associated rows ...
> WM = by( D60, D60[ "KeyProfA"], FUN=function(x) weighted.mean( x$IAC, x$Wt))
> D60$IAC.WM = as.numeric( WM[ D60$KeyProfA])
> class( WM)
[1] "by"
Questions ...
1) Is this a reasonable way
2008 May 05
4
Column renaming
Dear all,
Is there a less cumbersome way to rename a column by name (as opposed
to index) than --
names( X)[ names[ X] == "bob"]<-"sue"
?
A semi-related question: how does one get the index of a column by
name, something along the lines of col.index( X, "sue") ?
Chip Barnaby
---------------------------------------------------------
Chip Barnaby
2008 May 12
2
Collection of lm()s
Hello,
I would like to create a subscriptable collection (presumably a list)
of lm() models.
I have a data frame DX containing 6 groups of data. The general idea
is (NOT RUN) ...
for (i in 1:6)
{ DXS = subset( DX, <whatever>);
LMX[ i] = lm( <formula>, data = DXS);
}
Now access model results by subscript ... e.g. coefficients( LMX[
2]). Or would it be [[ 2]]?
I
2008 May 09
1
Data frame row manipulation
Greetings,
Q #1
------
How does one combine data frames by row ... no cleverness a la
merge(), just add rows.
For example, given A with 20 rows and B with 30 rows, I want C =
combine( A, B) having 50 rows.
Columns having matching names should be filled from both (all)
sources with suitable coercion, unmatched would get NA in rows whose
source does not have that column.
Q #2
------
Given
2008 Apr 07
2
predict.lm() question
Dear R-people ...
I'm a new user. I can't get predict.lm() to produce predictions for
new independent data. There are some messages in archived help about
this problem, but I still don't see my error after reviewing
those. I understand that the new independent data must have the same
name(s) as used when the model was made.
In the example below, predict.lm produces the
2006 Jan 17
1
Newbie question on using friedman.test()
I am trying to use the friedman.test() on a data frame, d, but
I am receiving the following error message:
> d
AW HS IAC WA
1 6 8 3 5
2 2 2 3 6
3 7 7 8 3
4 8 5 4 5
....
20 2 5 2 7
21 7 7 6 7
22 7 8 6 8
23 6 8 4 5
24 5 7 5 2
> friedman.test(d)
Error in any(is.na(groups)) : argument "groups" is missing, with no default
I think I
2009 Jul 06
4
problem with windows program in linux in virtual machine...
Hi,
I'm a complete linux newbie, let alone wine, easy-peasy and netbooks.
Having said that, I'm looking at buying the eee pc 701 sd and putting easy-peasy on it.
However the reason I need a netbook is to run a cricket scoring program that is only available in windows.
I didn't want to fork out for the netbook until I knew the cricket software will run, so I tried the following:
1.
2023 Jul 02
1
Strange error in R CMD check --timings
Am 02.07.23 um 18:01 schrieb Duncan Murdoch:
> This SO post: https://stackoverflow.com/q/76583828 describes a strange R
> CMD check error. Depending on the contents of a comment in one of the
> examples sections of a help page, an error like this could be triggered:
>
> > base::assign(".dptime", (proc.time() - get(".ptime", pos =
>
2020 May 04
1
error in message printed by L-BFGS-B
Hi
I have a FORTRAN version of the L-BFGS-B algorithm and I was comparing it
to the code in the lbfgsb.c file available at R-4.0.0.tar.gz
Everithing looks the same, except for those two lines that must be printed
by the prn3lb function in case of an error (lines 3559 and 3561 in
lbfgsb.c):
case -5: Rprintf("l(%d) > u(%d). No feasible solution", k, k); break;
case -7:
2004 Jan 07
2
Problem with Syslinux 2.07 and APM on SMP system
Hi,
We have a problem with Syslinux 2.07 and APM on an SMP system.
When either network booting with pxelinux.0 or CDROM booting
with isolinux we get a kernel error message:
Jan 7 09:59:51 ddcserver1 kernel: kernel BUG at apm.c:1756!
Jan 7 09:59:51 ddcserver1 kernel: invalid operand: 0000
Jan 7 09:59:51 ddcserver1 kernel:
Jan 7 09:59:51 ddcserver1 kernel: CPU: 1
Jan 7 09:59:51 ddcserver1
2023 Jul 02
1
Strange error in R CMD check --timings
This SO post: https://stackoverflow.com/q/76583828 describes a strange R
CMD check error. Depending on the contents of a comment in one of the
examples sections of a help page, an error like this could be triggered:
> base::assign(".dptime", (proc.time() - get(".ptime", pos =
"CheckExEnv")), pos = "CheckExEnv")
>
2004 Jun 08
1
data.frame size limit
Is there a limit to the number of columns that a data.frame can have? For
example, can I read.csv() a file that has 1000 columns and 10,000 rows,
will it break or is it limited by available memory.
...................................................................................
Philip Sobolik 781-862-8719 x111
Wrightsoft Corporation 781-861-2058 fax
394 Lowell
2006 Aug 22
6
/lib/tls.disabled or xen-friendly glibc?
Hi,
until now I have run Xen with /lib/tls out of the way for both dom0 and domU''s,
but now I''m trying to install OpenLDAP in a domU, which requires TLS as
default. So now I have at least three options ahead of me:
1. mv /lib/tls.disabled back to /lib/tls and accept the performance penalty (is
there any documentation on how heavy this penalty is?)
2. Compile OpenLDAP
2007 Dec 11
1
Error with rgl loading in BATCH mode
Dear all,
I'm trying to run a script that requires KernSmooth in BATCH mode but I get
an error while loading rgl library that is needed by KernSmooth. Actually I
have to run several batch files through a queue of a cluster, so I wouldn't
need graphics at all.
I installed the latest releases of R (2.6.1) and rgl on my CentOS 4.2 Linux
(clone of Red Hat EL) endowed with Rocks 4.2.1 suite
2002 Jun 26
4
evaluate a string
Hello together
i want to execute different commands that are saved in strings (eg: "d
<- 4+7" and some more complicated things). How can i execute/evaluate
them. I know i could save them to a temp-file a read this with source.
But is there a way without a file in the middle?
I know also the 'assign' command but I think it would only the simply
cases.
thanks and gruess
joerg
2003 Apr 23
2
Kerberized Telnet Badly Broken (Patch enclosed)
Ugh.
With MAKE_KERBEROS5=yes, on a recent STABLE,
I get the following trying to use Kerberized telnet:
# telnet -l test big.x.kientzle.com
Trying 66.166.149.54...
Connected to big.x.kientzle.com.
Escape character is '^]'.
[ Trying mutual KERBEROS5 (host/big.x.kientzle.com@X.KIENTZLE.COM)... ]
Bus error (core dumped)
Fortunately, it's pretty easy to track down:
(gdb) up
#2
2002 Mar 05
3
enhanced Question to stand. Beta
Hello everybody,
a question that connect to the question of Frederik Karlsons about 'how
to stand. betas'
With the stand. betas i can compare the influence of the different
explaning variables. What do i with the betas of factors? I can't use
the solution of JohnFox, because there is no sd of an factor. How can i
compare the influence of the factor with the influence of the numeric
2006 May 25
0
Development Project.
Hope Im posting on the correct forum...
I currently work for IAC / InterActiveCorp (www.iac.com) - owners and
operators of Ask Jeeves, LendingTree, Match.com, etc. etc.
Also pursuing a very interesting side project that is NOT affiliated
with IAC.
Looking to have a feedback / ratings system developed using RoR. Would
prefer to work with US-based programmers. Would expect the project to
2003 Jan 16
1
Fw: syslinux with flash discs?
Johan accidentally wrote me personally with the following email, which I
thought would be better intended for the syslinux list. Replies to *Johan*
please. :)
-d
----- Original Message -----
From: "Johan Win?s" <johan.winas at isg.se>
To: <david at weekly.org>
Sent: Thursday, January 16, 2003 2:33 AM
Subject: syslinux with flash discs?
> Hi..
>
> Just tried out