Displaying 20 results from an estimated 10000 matches similar to: "merging unbalanced rows"
2012 May 19
3
converting csv to image file
Hello everyone,
I want to get a 1km by lkm grid raster image using my csv data. If I call
latitude=a, longitude=b and preciptation=c.
a<-(1,2,3,4,5)
b<-(6,7,8,9,10)
c<-(10,20, 30,40, 50)
Then I found an example in r help which goes like
pts = read.table("file.csv",......)
library(sp)
library(rgdal)
proj4string(pts)=CRS("+init=epsg:4326") # set it to lat-long
pts =
2016 Apr 10
0
unbalanced number of rows
Please have a look at
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example and/or http://adv-r.had.co.nz/Reproducibility.html
It looks like you have posted in HTML and the post is close to unreadable.
The data is welcome but we really should have in in dput() form. Do ?dput() for more information.
John Kane
Kingston ON Canada
> -----Original Message-----
2016 Apr 10
0
unbalanced number of rows
HiI have a data frame with rows specifying companies (codes are assigned to companies) and columns specify months (monthly data). The data is based on male (M) and female (F) information for each month. Following is an example of how data looks like:
01 02 03 04001 na M M M001 M M M F002 M F F na003 M na na M003 F M M F003 F F M M
na= no male/female.
Now, I want to firstly add rows with similar
2007 Dec 23
3
How to remove some rows from a data.frame
Hello list,
I have a data frame M like:
BAC chr pos s1 s2
RP11-80G24 1 77465510 -1 0
RP11-198H14 1 78696291 -1 0
RP11-267M21 1 79681704 -1 0
RP11-89A19 1 80950808 -1 0
RP11-6B16 1 82255496 -1 0
RP11-210E16 1 228801510 0 -1
RP11-155C15 1 230957584 0 -1
RP11-210F8 1
2008 Jun 15
2
How to take the average of multiple rows
Dear all,
I have a matrix, called newdata1,
> dim(newdata1)
[1] 34176 83
It looks like:
EntrezID Name S1 S2 S3 S4 S5.....
1 4076 CAPRIN1 0.1 0.2 0.3...
2 139170 WDR40B 0.4 0.5 0.6...
3 5505 PPP1R2P1 0.3 0.3 0.7...
4 4076 CAPRIN1 0.7 0.3 0.2...
5 139170 WDR40B null 0.8
2012 Apr 16
3
Select rows based on condition
Hi,
I am relatively new to R and I am trying to figure out how to select rows of
my data based on a condition.
For example in the dataset below multiple observers recorded data at the
same point on the same date and the data was recorded on separate rows, but
I only need one of the rows of data. Is it possible to use grep to search
for rows that have matching PtName and Date and then select the
2011 Jul 21
1
replacing duplicate rows
Hi all,
I have a matrix which looks like the following,
x=matrix(c(1,2,3,4,3,5,4,6,4,9),5,2,byrow=T)
Now, I want to replace the 2nd columns of those 4 rows which have duplicate
entries in the 1st column. For example, x[2,1]=x[3,1]=3 and I want to
replace x[3,2] by x[2,2]. Similarly, I want to replace x[5,2] with x[4,2],
which means that for duplicate entries in the 1st column, I want to replace
2007 Jul 17
1
RH domU doesn''t see disk?
more /etc/xen/scalix2
kernel="/boot/vmlinuz-2.6.18-8.1.6.el5xen"
memory = 512
name = "hating-xen"
vif = [''ip = "10.0.1.150", bridge=xenbr0'']
disk = [
''/dev/XEN/scalixroot,sda1,w'',
''/dev/XEN/scalixvar,sda3,w'',
''/dev/XEN/scalixswap,sda2,w''
]
It
2007 Apr 03
2
Coding for contrasts in unbalanced designs
Dear list members,
I want to use a GLM with an unbalanced factor and continuous variables.
My factor F has 12 unbalanced levels:
2011 Jan 08
1
Anova with repeated measures for unbalanced design
Dear all,
I need an help because I am really not able to find over internet a good example
in R to analyze an unbalanced table with Anova with repeated measures.
For unbalanced table I mean that the questions are not answered all by the same
number of subjects.
For a balanced case I would use the command
aov1 = aov(response ~ stimulus*condition + Error(subject/(stimulus*condition)),
data=scrd)
2011 May 21
2
unbalanced anova with subsampling (Type III SS)
Hello R-users,
I am trying to obtain Type III SS for an ANOVA with subsampling. My design
is slightly unbalanced with either 3 or 4 subsamples per replicate.
The basic aov model would be:
fit <- aov(y~x+Error(subsample))
But this gives Type I SS and not Type III.
But, using the drop() option:
drop1(fit, test="F")
I get an error message:
"Error in
2012 Oct 29
2
Two-way Random Effects with unbalanced data
Hi there,
I am looking to fit a two-way random effects model to an *unblalanced*
layout,
y_ijk = mu + a_i + b_j + eps_ijk,
i=1,...,R, j=1,...,C, k=1,...,K_ij.
I am interested first of all in estimates for the variance components,
sigsq_a, sigsq_b and sigsq_error.
In the balanced case, there are simple (MM, MLE) estimates for these; In the
unbalanced setup,
2009 Jul 25
1
regex expression to select row or column
I have a multidimensional data which looks like the following:
"S1-a" "S2-b" "S3-c" "S4-d" "S5-a" "S6-b" "S7-c" "S8-d"
"T1-A"
"T1-B"
"T1-C"
"T1-D"
"T2-A"
"T2-B"
"T2-C"
"T2-D"
I read it from csv file and would like to have 16
2011 Apr 26
1
logistic regression: wls and unbalanced samples
Greetings from Rio de Janeiro, Brazil.
I am looking for advice / references on binary logistic regression
with weighted least squares (using lrm & weights), on the following
context:
1) unbalanced sample (n0=10000, n1=700);
2) sampling weights used to rebalance the sample (w0=1, w1=14.29); e
3) after modelling, adjust the intercept in order to reflect the
expected % of 1?s in the population
2011 Mar 08
1
lags for unbalanced panel data
Hello, I was wondering if there was an easy way to calculate the rate of
change in a variable for an unbalanced panel data set. Below is a detailed
description in R of what I am asking. Thank you. Geoff
#Suppose I have the following unbalanced panel data;
Person <- c(rep('Frank',5), rep('Tony',4), rep('Edward',4));
Year <-
2012 Aug 14
2
anova in unbalanced data
Hi all,
Say I have the following data:
a<-data.frame(col1=c(rep("a",5),rep("b",7)),col2=runif(12))
a_aov<-aov(a$col2~a$col1)
summary(aov)
Note that there are 5 observations for a and 7 for b, thus is
unbalanced. What would be the correct way of doing anova for this set?
Thanks,
Sachin
[[alternative HTML version deleted]]
2012 Jun 12
1
Unbalanced Design Power Analysis
I have an unbalanced design I would like to run a power analysis on.
What I have been able to find has pointed me to using the pwr.f2.test
function as described below. My problem is that I don't know how to
appropriately define the numerator and demoninator df.
If someone can help here is some more info about my design.
It is an unbalanced 2^3 x 3 design where the factor with 3 levels is a
2010 Apr 09
0
panel regression with twoways random effects, on unbalanced data?
Dear R users
What would be the best way to approach estimating a panel regression
with twoways random effects, on unbalanced data? Unfortunately, the
"plm" package has no implementation of twoways random effects for
unbalanced data. Currently I'm considering two approaches:
- extend "plm" to cover this type of panel regression. (For the
authors, cc'ed:) Would
2006 Jul 21
2
rpart unbalanced data
Hello all,
I am currently working with rpart to classify vegetation types by spectral
characteristics, and am comming up with poor classifications based on the fact
that I have some vegetation types that have only 15 observations, while others
have over 100. I have attempted to supply prior weights to the dataset, though
this does not improve the classification greatly. Could anyone supply some
2004 Mar 09
2
SVM unbalanced classes
Hi!
I am using R 1.8.1 and the svm of the e1071 package for classification.
The problem is that I have unbalanced classes e.g. the first one is much bigger than the second one and therfore the svm is biased to the first class.
If I manually adjust the class size the bias disappears.
The question is then how to include this unequal class distribution to the svm (e.g. via wheights or costs)?