Displaying 20 results from an estimated 1000 matches similar to: "Data frame row manipulation"
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 Apr 30
1
Aggregate() questions
Dear all --
I have a data frame containing data related to heat gain through
windows. The general form is ...
Key ProfA IAC <many other numeric columns>
AAA 0 .7
AAA 10 .6
AAA 0 .66
AAA 20 .45
(more AAA rows)
(then AAB rows)
'Key' identifies the physical configuration ... rows with a given Key
contain data for same window under various
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 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
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
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.
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
2008 Jan 03
4
physical device
Hi!
I'' ve a xen virtual machine, and i'' d like to assign cdrw device to it. My
physical device on domain0 is /dev/hda, and in the configuration file i''
ve this:
disk = [ ''phy:vg0/vx-disk,sda1,w'', ''phy:vg0/vx-swap,sda2,w'',
''phy:vg0/vx-data,sda5,w'' ]
I'' ve tried to assign the cdrom to it in many ways i
2019 Jun 13
1
"samba-tool domain join" doesn't work with -U and -k
Hello,
Summary: "samba-tool domain join" doesn't seem to work if you pass
both "-k yes" and -U.
Samba version: 4.9.5-Debian
I have a newly-provisioned AD domain with a single DC (dc1). I'm
attempting to join a second DC (dc2), per the wiki.
On dc2:
- I have /etc/resolv.conf pointing at dc1 (confirmed all AD DNS
resolution works)
- I've copied the basic
2019 Jun 27
2
[PATCH v2] drm/bochs: fix framebuffer setup.
The driver doesn't consider framebuffer pitch and offset, leading to a
wrong display in case offset != 0 or pitch != width * bpp. Fix it.
Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
---
drivers/gpu/drm/bochs/bochs.h | 2 +-
drivers/gpu/drm/bochs/bochs_hw.c | 14 ++++++++++----
drivers/gpu/drm/bochs/bochs_kms.c | 3 ++-
3 files changed, 13 insertions(+), 6 deletions(-)
2009 Feb 24
2
email stuck in outbox
Can anyone here help me out with a client side Outlook issue? I know
outlook is a horrible imap client :(
We intermittently have a problem where mail gets "stuck" in Outlook
users' outboxes.
Might have anything to do with dovecot? Is there anyway I can
troubleshoot this server side? Are there any settings I can tweak?
We have a new and an old dovecot server (see below) and both
2001 Jul 09
1
Error plotting time series
Hi there,
when plotting a time series I got this error message:
Error in xy.coords(x, y, xlabel, ylabel, log) :
x and y lengths differ
In addition: Warning messages:
1: longer object length
is not a multiple of shorter object length in: vx.1[int.lr] + (-1) *
vx.2[int.rl]
vx.1[int.rl] and vx.2[int.rl] have the same length. Does anybody know
what the warning message means?
Thanks, Sven
2013 May 20
1
How to fit a normal inverse gaussian distribution to my data using optim
Dear R Help
Please forgive my lack of knowledge,.I would be very thankful for some help.
Here is my problem:
I was using optim to estimate parameters of a model and I get this error message
"Error in optim(x0, fn = riskll, method = "L-BFGS-B", lower = lbs, upper = ubs, :
L-BFGS-B needs finite values of 'fn'"
Below is the R code I have written.
2010 Feb 25
1
Accessing named elements of a vector
Dear R developers,
A great R feature is that elements of vectors, lists and dataframes can
have names:
vx = c(a=1, b=2)
lx = list(a=1, b=2)
Accessing element "a" of vx: vx['a']
Accessing element "a" of lx: lx[['a']] or lx$a
Might be a matter of taste, but I like the $ very much. Unfortunately,
vx$a is not
functional. Would it break existing compatibility
2019 Jun 26
1
[PATCH 2/2] drm/bochs: fix framebuffer setup.
If bo->width doesn't match fb->width the driver fails to configure
the display correctly, resulting in a scrambled display. Fix it.
Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
---
drivers/gpu/drm/bochs/bochs.h | 2 +-
drivers/gpu/drm/bochs/bochs_hw.c | 13 +++++++++----
drivers/gpu/drm/bochs/bochs_kms.c | 1 +
3 files changed, 11 insertions(+), 5 deletions(-)
2004 Feb 14
6
Beginner's question about t.test()
Dear All,
I am doing some exercise in statistics textbook on comparison of two
experimental means. Is it possible to use t.test() do t-test when I have
only two means, sample size, two standard deviations ? (no raw data).
Thanks.
Pramote
2011 Oct 05
4
SPlus to R
I'm trying to convert an S-Plus program to R. Since I'm a SAS programmer I'm not facile is either S-Plus or R, so I need some help. All I did was convert the underscores in S-Plus to the assignment operator <-. Here are the first few lines of the S-Plus file:
sshc _ function(rc, nc, d, method, alpha=0.05, power=0.8,
tol=0.01, tol1=.0001, tol2=.005, cc=c(.1,2),
2011 Nov 21
1
quota.h
Hi
configure samba4 with --with-sys-quotas and check bin/config.log see this
message:
------------------------------------------
Checking for header sys/fs/vx/quota.h
==>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <stddef.h>
#include <memory.h>
#include <string.h>
#include <strings.h>
#include