similar to: Randomly select elements based on criteria

Displaying 20 results from an estimated 8000 matches similar to: "Randomly select elements based on criteria"

2005 Feb 23
1
How to conctruct an inner grouping for nlme random statement?
Hello. Im hoping someone can help with a grouping question related to the "random=" statement within the nlme function. How do you specify that some grouping levels are inner to others? I tried several things, given below. Lets say I have a data frame with five variables, resp, cov1, ran1, ran2, group1, and group 2. The formula is resp~cov1 + ran1 + ran2, where the ran are random
2001 Sep 11
2
data frames
Dear R-list members Here goes a question on data frames: I want to create a new data frame excluding some records (rows) from an existing one. Considering the data frame "fish.dat" at the end of this message, I can make a boxplot(Ring~Radius) and identify the points at rows 11 and 25 as outliers. With the command fish.dat[c(11, 25),] I can identify which fishes are related to
2012 Mar 19
2
Reshape from long to wide
Hi, I'm a total beginner in R and this question is probably very simple but I've spent hours reading about it and can't find the answer. I'm trying to reshape a data table from long to wide format. I've tried reshape() and cast() but I get error messages every time and I can't figure why. In my data, I have the length of two fish from each family. My data table (called
2005 Mar 23
3
nested random effects
Hi I am struggling with nested random effects and hope someone can help. I have individuals (ID) who are nested within families (FAM). I want to model an outcome variable, and take account of the intercorrelation of individuals within each family. I think this amounts to two random effects, one nested within the other. How can I model this in R? So far I have tried using the
2009 Sep 08
1
Function to query ASTDB families
Hi, Asterisk database is made of <family><key> records such as: fam key1 val1 fam key2 val2 ... fam key100 val100 I'm looking for the smartest way to iterate among different keys associated to a given family. One way to do this is to parse "database show fam" response. Is there something smarter ? Something like ${DBKEYS(fam)} which would evaluate to "key1
2006 Sep 04
1
fam error
Dear Samba Friends, I got the following error again and again: <snip> ..... Sep 4 10:58:18 sun smbd[94479]: [2006/09/04 10:58:18, 0] smbd/notify_fam.c:fam_check_reconnect(136) Sep 4 10:58:18 sun smbd[94479]: failed to connect to FAM service Sep 4 10:58:23 sun smbd[94479]: [2006/09/04 10:58:23, 0] smbd/notify_fam.c:fam_check_reconnect(136) Sep 4 10:58:23 sun smbd[94479]: failed to
2005 Aug 01
6
converting stata's by syntax to R
I am struggling with migrating some stata code to R. I have a data frame containing, sometimes, repeat observations (rows) of the same family. I want to keep only one observation per family, selecting that observation according to some other variable. An example data frame is: # construct example data fam <- c(1,2,3,3,4,4,4) wt <- c(1,1,0.6,0.4,0.4,0.4,0.2) keep <- c(1,1,1,0,1,0,0)
2012 Oct 31
2
how can xyplot word when with for control flow
Hi everybody, I recently used xyplot, but I found that for control flow can't work in the xyplot. The program code and some of my data file are shown as follow. Would someone please tell me where my code is wrong and how can make the code right? Thanks. Best regards Yuanzhen Lin Code: library("lattice") plot.data$Fam<-as.numeric(plot.data$Fam) #### xyplot can work if one
2005 Dec 14
3
Fitting binomial lmer-model, high deviance and low logLik
Hello I have a problem when fitting a mixed generalised linear model with the lmer-function in the Matrix package, version 0.98-7. I have a respons variable (sfox) that is 1 or 0, whether a roe deer fawn is killed or not by red fox. This is expected to be related to e.g. the density of red fox (roefoxratio) or other variables. In addition, we account for family effects by adding the mother
2003 Sep 08
1
Problems deleting directories on smbmounted partitions
Hi, I'm having some odd problems with samba in combination with fam. On my linux system I have mounted some partitions that are shared by a Win2k machine on my LAN. With any GUI filemanager using fam I can create files and directories, but I can't delete directories, only files. If I try to delete a directory, it just doesn't work. If I try to delete a directory containing files,
2012 Mar 05
1
Order a data frame based on the order of another data frame
Hi, I am trying to match the order of the rownames of a dataframe with the rownames of another dataframe (I can't simply sort both sets because I would have to change the order of many other connected datasets if I did that): Also, the second dataset (snp.matrix$fam) is a snp matrix slot: so for example: data_one: x y
2007 Nov 27
2
lme object manipulation
Hello: I have an lme object, say lme_res2, which was generated using the varIdent. I'm trying to extract the double 1.532940 from the object, but I can't find it by attributes(lme_res2) or attributes(summary(lme_res2)). How can I pull it out (so that I can save it to another variable)? Thanks. Shin Linear mixed-effects model fit by REML Data: dat Log-restricted-likelihood:
2010 Jul 26
1
form date helper with text year
I have a date where the year range is more then I want to define in a select_date scaffold generated year range. My idea was to have the year entered as a text field and the month and day using something like: <%= select_month @person.born,:prefix => :person ,:field_name => "born(2i)" %> <%= select_day @person.born,:prefix => :person , :field_name =>
2012 Jan 02
2
summary per group
Hello, I know that it'll be quite easy to do what I want but somehow I am lost as I am new to R. I want to get summary results arranged by groups. In detail I'd like get the number (levels) of Species per Family like for this dataset: SPEC <-
2011 Apr 13
1
FAM linking error on Irix
Hi all, I am compiling Samba 3.5.8 on Irix 6.5.28 using gcc 3.4.6 . Towards the end the linking phase stops with the following error: [...] Compiling ../lib/popt/poptparse.c Linking bin/smbd /usr/lib32/libfam.a(fam.o): In function `FAMOpen2': /xlv44/6.5.28m/work/eoe/lib/libfam/libfam_n32_M3/fam.c++:51: relocation truncated to fit: R_MIPS_GPREL16 against `.srdata'
2006 Jan 23
1
simple problem
Hi, look this: > summary(fam??lia) Anacardiaceae Annonaceae Bombacaceae Cecropiaceae 2 4 1 3 Chrysobalanaceae Clusiaceae Euphorbiacaea Fabacea 1 1 4 3 Fabaceae Flacourtiaceae Humiriaceae indeterminada
2012 Oct 05
1
Error in lmer: asMethod(object) : matrix is not symmetric [1, 2]
Dear R Users, I am having trouble with lmer. I am looking at recombinant versus non recombinant individuals. In the response variable recombinant individuals are coded as 1's and non-recombinant as 0's. I built a model with 2 fixed factors and 1 random effect. Sex (males/females) is the first fixed effect and sexual genotype (XY, YY, WX and WY) the second one. Sexual Genotype is
2017 Nov 21
0
mystery "158"
Your data frame fam contains factors. Turn it into character strings using fam$Family = as.character(fam$Family) and try again. It may be helpful if you read up on R's factors, see ?factor. HTH, Peter On Tue, Nov 21, 2017 at 2:14 PM, Glen Forister <gforister at gmail.com> wrote: > This is a simple problem, but a mystery to me. > I'm trying to grab $Family
2017 Nov 21
2
mystery "158"
This is a simple problem, but a mystery to me. I'm trying to grab $Family "Scelionidae" from one dataframe and put it into another dataframe occupied with NA in $Family. The result is a "158" ends up there instead of Scelionidae. Simply put fam$Family[1] <- least$Family[1] If I have made a mistake here, can somebody point it out. I've included the simple
2009 Jun 17
1
function to determine to which class/category a value belongs to?
Hi all, I''ve got a simple contingency table produced with table(), and the upper and lower quartiles (quantile25 and quantile75) for the same dataset. Is there a function that tells me in which category does the value of the quartile falls into? for example: tabsp <- table(fam$I[fam$I>0]) 1 3 6 6 1 1 and for the cumulative frequency distribution tabcum <- cumsum(tabsp) 1 3