similar to: A random insertion position in a vector

Displaying 20 results from an estimated 6000 matches similar to: "A random insertion position in a vector"

2007 Oct 26
1
finding birth position
Hi All, I have data on the sequence of births for families with completed fertility cycle (in a data frame); the relevant variables are called b1, b2, b3, b4, b5, b6 and record the birth of the first, second, ..., sixth child. So, b1=1 if the first birth is male, b1=2 if the first birth is female, and b1=NA if the family did not record any first birth. Similarly for b2, b3, b4, b5 and b6. I
2009 Oct 21
1
re ferring to data of previous rows
Dear Rlers, in the following dataset I would like to insert a new column that refers to the data of the previous row. My question is whether the probability of a female (Id) changes if she had given birth to a pup in the previous year. So my dataframe consists of the column Id, year (2003-2007 for each Id) and offspring (=of; 1-0): Id year of 1 2003 1 1 2004 0 1
2008 Mar 31
5
[LLVMdev] Additional Optimization I'm Missing?
Hello, I'm working on using the LLVM JIT for a little project of mine, amazing work first off! I have a question about optimization passes. I initially have this function I've created, in python it looks like this: OS_end = 50OS_start = 0OS_timestep = 1birth_rate = .3population = 30.0for time in range(OS_start, OS_end, OS_timestep): births = birth_rate * population deaths = 0.1
2007 Aug 29
2
Recoding multiple columns consistently
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 consistent. Not all identifiers appear in the individual column - it is
2015 Apr 30
2
búsqueda y sustitución masiva
Hola a tod en s, explico lo que estoy intentando hacer... Tengo un listado de url comprimidas de twitter, entre las cuales hay muchas repetidas, por lo que el número de registros llega a más de 15K. Por otro lado tengo otra lista de esas url únicas con su equivalente ya descomprimido llegando a un registro de 900. El problema que tengo es que estoy intentando hacer un loop para hacer la
2009 Apr 22
1
converting histogram to barchart
Hi list, After a lot of tweaking i have managed to create a histogram with an overlaying density plot. The histogram shows a sample of birth weights of babies and the density plot shows birth weights from a much larger reference populaton. My data is divided in 0.1 Kg bins so in the code below binweigh=0.1. The trouble with the current graph is that it is not very clear since the density plot
2005 Jan 25
2
tapply and names
I have a data frame containing children, with variables 'year' = birth year, and 'm.id' = mother's id number. Let's assume that all the births of each mother is represented in the data frame. Now I want to create a subset of this data frame containing all children, whose mother's first birth was in the year 1816 or later. This seems to work: mid <-
2008 Apr 18
2
naive question regarding running parallel C code from R
Hi, I have only the vaguest notions of what parallel programing, but I think I have a situation where it might be of use to me, or at least provide me with the opportunity to learn more about it. Before I invest in figuring out the nuts and bolts, can anyone confirm that this is a sane approach, or provide alternatives that I could pursue? I'm running stochastic simulations, with the actual
2007 Jun 06
3
Using odesolve to produce non-negative solutions
Hello, I am using odesolve to simulate a group of people moving through time and transmitting infections to one another. In Matlab, there is a NonNegative option which tells the Matlab solver to keep the vector elements of the ODE solution non-negative at all times. What is the right way to do this in R? Thanks, Jeremy P.S., Below is a simplified version of the code I use to try to do this,
2010 May 19
2
Joining two (or more) frequency tables
Hi, I am still new to R and have, in spite of searching all over, found no "understandable" documentation for how to join two (or more) frequency tables. Why would I want to do that and what do I mean by "joining" ? Let me try to explain: I have a diagnosis form that allows registration of up to three diagnosis codes on animals with birth defects, like this: father.id
2007 Dec 06
3
using "eval(parse(text)) " , gsub(pattern, replacement, x) , to process "code" within a loop/custom function
R-help users, Thanks in advance for any assistance ... I truly appreciate your expertise. I searched help and could not figure this out, and think you can probably offer some helpful tips. I apologize if I missed something, which I'm sure I probably did. I have data for many "samples". (e.g. 1950, 1951, 1952, etc.) For each "sample", I have many data-frames.
2006 Dec 02
1
Chi-squared approximation may be incorrect in: chisq.test(x)
I am getting "Chi-squared approximation may be incorrect in: chisq.test(x)" with the data bleow. Frequency distribution of number of male offspring in families of size 5. Number of Male Offspring N 0 518 1 2245 2 4621 3 4753 4 2476 5
2011 Mar 16
1
Standardized Pearson residuals (and score tests)
Hi Peter and others, If it helps, I wrote a small function glm.scoretest() for the statmod package on CRAN to compute score tests from glm fits. The score test for adding a covariate, or any set of covariates, can be extracted very neatly from the standard glm output, although you probably already know that. Regards Gordon --------------------------------------------- Professor Gordon K
2008 Mar 19
1
betabinomial model
Hi, can anyone help me fit betabinomial model to the following dataset where each iD is a cluster in itself , if i use package aod 's betabinom model it gives an estimate of zero to phi(the correlation coeficient ) and if i fix it to the anova type estimate obtained from icc( in package aod) then it says system is exactly singular. And when i try to fit my loglikelihood by
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
2004 Dec 01
1
prediction
Hi! I have a dataset of the lifespans (birth/death date) of about 100,000 people. I also have the birth dates of about 1,000,000 people who are still alive. I also have other information for each of these people including faculty,state,year graduated etc. I would like to do some statistical analysis but since the data is factored i'm having trouble. I looked into using the SVM package to
2012 Feb 23
1
segfault when using data.table package in conjunction with foreach
Hi all, I'm trying to use the package read.table within a foreach loop. I'm grabbing 500M rows of data at a time from two different files and then doing an aggregate/tapply like function in read.table after that. I had planned on doing a foreach loop 39 times at once for the 39 files I have, but obviously that won't work until I figure out why the segfault is occurring. The
2009 Nov 23
2
non-intuitive behaviour after type conversion
Deal list, I have a data frame (birth) with mixed variables (numeric and alphanumeric). One variable "t1stvisit" was originally coded as numeric with values 1,2, and 3. After attaching the data frame, this is what I see when I use str(t1stvisit) $ t1stvisit: int 1 1 1 1 1 1 1 1 2 2 ... This is as expected. I then convert t1stvisit to a factor and to avoid creating a second
2008 Jun 13
2
Rails 2.1: invalid date automatically convertion
Hi all, Rails 2.1 seems to converts the following parameters {''birth(1i)''=''1990'', ''birth(2i)''=>''2'', ''birth(3i)''=>''31''} into date ''1990-03-02'' automatically. Is it able to inhibit this convertion? -- makoto kuata
2009 Apr 23
1
Loess over split data
Dear R users, I am having trouble devising an efficient way to run a loess() function on all columns of a data.frame (with the x factor remaining the same for all columns) and I was hoping that someone here could help me fix my code so that I won't have to resort to using a for loop. (You'll find the upcoming lines of code in a single block near the end of the message.) Here's a