similar to: Recoding multiple columns consistently

Displaying 20 results from an estimated 1000 matches similar to: "Recoding multiple columns consistently"

2005 Jul 01
2
loop over large dataset
Hi All, I'd like to ask for a few clarifications. I am doing some calculations over some biggish datasets. One has ~ 23000 rows, and 6 columns, the other has ~620000 rows and 6 columns. I am using these datasets to perform a simulation of of haplotype coalescence over a pedigree (the datestes themselves are pedigree information). I created a new dataset (same number of rows as the pedigree
2010 Mar 18
2
Pedigree / Identifying Immediate Family of Index Animal
I have a data frame containing the Id, Mother, Father and Sex from about 10,000 animals in our colony. I am interested in graphing simple family trees for a given subject or small number of subjects. The basic idea is: start with data frame from entire colony and list of index animals. I need to identify all immediate relatives of these index animals and plot the pedigree for them. We're
2011 Apr 16
3
lme4 problem: model defining and effect estimation ------ question from new bird to R community from SAS community
Hi R community, I am new bird to R and moved recently from SAS. I am no means expert on either but very curious learner. So your help crucial for me to learn R. I have already got positive expression. I was trying to fit a mixed model in animal experiment but stuck at simple point. The following similar example is from SAS mixed model pp 212. # data genetic_evaluation <-
2005 Jul 21
3
vectorising ifelse()
Hi All, is there any chance of vectorising the two ifelse() statements in the following code: for(i in gp){ new[i,1] = ifelse(srow[i]>0, new[srow[i],zippo[i]], sample(1:100, 1, prob =Y1, rep = T)) new[i,2] = ifelse(drow[i]>0, new[drow[i]>0,zappo[i]], sample(1:100, 1, prob =Y1, rep = T)) } Where I am forced to check if the value of drow and srow are >0 for each line... in
2007 Aug 30
0
R-help Digest, Vol 54, Issue 30
Ron Crump wrote: > Hi, > > I have a dataframe that contains pedigree information; > that is individual, sire and dam identities as separate > columns. It also has date of birth. > > These identifiers are not numeric, or not sequential. > > Obviously, an identifier can appear in one or two columns, > depending on whether it was a parent or not. These should > be
2005 Oct 26
1
syntax for interactions in lme
Hello, I am trying to make the switch from SAS, and I have a fairly elemental problem with syntax using the nlme package for analyzing mixed models. There was a previous question on this topic posted to this list, so I apologize for redundancy, but I didn't understand the advice given to that inquiry. The model I want to run has the following factors: Host (fixed) Sire (random) Dam
2013 Mar 11
4
Pedigreemm
Hola a todos, me gustaría realizar una consulta asociada a la generación de valores genéticos del pedigreemm en R. Primero generé el archivo de pedigree incluyendo los parentales para posteriormente estimar la varianza aditiva y los valores genéticos para cada individuo, relacionando los individuos por medio de la matriz de parentesco. Me da todo perfecto, el complemento pedigreemm trabaja muy
2005 Oct 30
1
Help with Subtracting an effect from a Mixed Model
Hi Everyone, I posted a similar question about a week ago, but haven't gotten any replies -- I'm afraid that's because my previous question was too vague. Let me try again with a more specific question, and I hope someone can help. NOTE, I know I should be using the newer lme4 package, I just haven't had a chance to update my version of R yet, so the question below relates
2004 Dec 06
2
Re : LOOPS
Dear lists, I want to construct a loop in R, but don't know how to do it. I can do it in SAS, but I prefer in R (which I am hoping I will off SAS for good soon). Could anyone help me to convert the SAS codes to equivalent R codes. Basically, the following codes were written to establish the sire gametes or phases for daughter design for one markers two alleles. Here are the SAS code: do
2009 Oct 22
1
help sub setting data frame
Hi, I'm running into a problem subsetting a data frame that I have never encountered before: > dim(chkPd) [1] 3213 6 > df = head(chkPd) > df PN WB Sire Dam MG SEX 601 1001 715349 61710 61702 67 F 969 1001_1 511092 616253 615037 168 F 986 1002_1 511082 616253 623905 168 F 667 1003 715617 61817 61441 67 F
2008 Feb 25
0
Extracting variance components from a Manova
I am trying to run a simple nested manova with two levels of nesting, Sires, and Dams within Sires. The goal is to extract the among sires covariance matrix and secondarily, the among Dams within Sires covariance matrix. Both sires and dams are random effects. At present there are four dependent variables, but that may change. This is part of a larger bootstrapping project, so efficiency and
2011 Mar 10
1
snp-chip table
Dear R helpers I have a table and i need to make new table table1: sire snp1 snp2 snp3 snp4 snp5 snp6 snp7 snp8 snp9 snp10 snp11 snp12 snp13 snp14 snp15 8877 -1 -1 -1 -1 0 0 -1 -1 -1 0 1 1 1 -1 -1 7765 1 1 1 0 0 0 -1 1 1 1 0 0 0 1 0 8766 1 1 -1 0 -1 -1 0 -1 0 -1 -1 -1 0 1 0 6756 0 1 0 -1 1 -1 -1 0 0 0 0 -1 0 1 1 5644 -1 0 1 -1 0 0 0 0 -1 -1 0 0 0 0 1 I have table2 sire
2009 Apr 19
0
Tow to perform diallel analysis in R?
I want to use a diallel analysis in R, for some of my own data. I've been through the primary literature and textbooks, and remain stumped as to how to implment this in R. I can illustrate the problem using a published example dataset: [Cockerham and Weir (1977) Quadratic Analyses of Reciprocal Crosses. Biometrics, Vol. 33, No. 1 pp. 187-203] In this study, 8 different individuals were
2002 Aug 28
0
Extracting variance component estimates from lme
I assume I'm missing something obvious here... The short form of my main question is: how do I extract variance components from an lme object? The longer form (plus optional supplementary question!): I'm looking at some quantitative genetics, and want to estimate two variance components so that I can then calculate a statistic called Qst from them. So I have this: reg1 <- lme(y ~
2007 Apr 23
1
Dominance in qtl model
Hi, I'm using R for a QTL analysis of SNP data. I was wondering if anyone had any advice on fitting a dominance effect into the following function; > myfun4 function (x) { x <- scan(con, nmax=169) y <- unique(x[which(!is.na(x))]) if(length(y)>1) { summary(lme(Ad ~ x, random= ~1|sire, na.action="na.omit")) } else {print("no.infomation")} } Con is the
2003 Oct 01
2
newbie question: MOH problem
Just the sort of newbie question we all hate ;-) I'm a bit stuck with MOH. I think all is done right and I've read everyhing I can find, but whenever * tries to do MOH, all that happens is '-z: No such file or directory' Yes, I am on redHat. Yes I have installed real mpg123. Yes, it does seem to work from the command line. Any suggestions would be greta, I'm sire
2002 Dec 18
8
iptables: Invalid argument
2006 Oct 21
0
[Fwd: [AGDG-LIST:405] R Computing Contest]
-------- Original Message -------- Subject: [AGDG-LIST:405] R Computing Contest Date: Sat, 21 Oct 2006 12:08:13 -0400 From: Larry Schaeffer <lrs at uoguelph.ca> Reply-To: lrs at uoguelph.ca To: Animal Geneticist's Discussion <agdg-list at colostate.edu> For those that are interested only: R Computer Programming Challenge Given: y = Factor A + Factor B + b1(Covariate1) +
2005 Nov 14
1
Tidiest way of modifying S4 classes?
I wish to make modifications to the plot.pedigree function in the kinship package. My attempts to contact the maintainer have been unsuccessful, but my question is general, so specifics of the kinship package might not be an issue. My first attempt was to make a new function Plot.pedigree in the .GlobalEnv which mostly achieved what I wanted to. However, I'm sure that's not the tidiest
2008 Feb 06
2
kinship package: drawing pedigree error
Hi Im using the kinship package to draw a pedigree. On my data set this works fine but when i add indivudals to the pedigree i keep getting an error i hope someone can help me! This is the code im using: Data<-read.table("Tree.txt", header=T, sep=",") attach(Data) ped<-pedigree(id, dadid, momid, sex, aff) par(xpd=T) plot.pedigree(ped) This is my data looks like