Displaying 20 results from an estimated 100 matches similar to: "Deleting rows or cols that do not meet cut off"
2010 Jun 26
2
Recoding dates to session id in a longitudinal dataset
Hi,
I'm fairly new to R but I have a large dataset (300000 obs) containing
patient material. Some patients came 2-9 times during the three year
observation period. The patients are identified by a unique idnr, the
sessions can be distinguished using the session date. How can I recode the
date of the session to a session id (1-9). This would be necessary to obtain
information and do some
2006 Nov 29
1
Extract some character from a character vector of length 1
the content of th character vector (of length 1) is as follows:
a <- "something2 ....pat1 name1 pat2 something2....pat1 name2
pat2....pat1 name3 pat2 "
I would like to extract the character bewteen pat1 and pat2. That's to
say, I would like to get a vecter of c("name1", "name2","name3").
What I did is use strsplit() twise. But I wonder if there
2003 May 14
2
number of patients in a hospital on a given date
Dear R-users!
I am using R 1.7.0, under Windows XP.
Having some hospital discharge data (admission date and discharge date for
each patient), I want to get the number of patients in the hospital on a
given date.
My data look like (simple example):
> x <- data.frame(patid=c("pat1", "pat2"), adm.date = c("15.03.2002",
"16.03.2002"),
2007 Mar 06
2
how to edit my R codes into a efficient way
Hello, Everyone,
I am a student an a new learner of R and I am trying to do my homework
in R. I have 10 files need to be read and process seperately. I really
want to write the codes into something like "macro" to save the lines
instead of repeating 10 times of similar work.
The following is part of my codes and I only extracted three lines for
each repeating section.
data.1 <-
2013 Dec 17
3
In-string variable/symbol substitution: What formats/syntax is out there?
Hi,
I'm try to collect a list of methods/packages available in R for doing
in-string variable/symbol substitution, e.g. someFcn("pi=${pi}"),
anotherFcn("pi=@pi@") and so on becomes "pi=3.141593". I am aware of
the following:
** gsubfn() in the 'gsubfn' package, e.g.
> gsubfn( , , "pi = $pi, 2pi = `2*pi`")
[1] "pi = 3.14159265358979,
2009 May 11
3
Looking for a quick way to combine rows in a matrix
I'm working with genotype data in a frequency table:
> a=matrix(1:16, nrow=4)
> rownames(a)=c("AA","AT","TA","TT")
> a
[,1] [,2] [,3] [,4]
AA 1 5 9 13
AT 2 6 10 14
TA 3 7 11 15
TT 4 8 12 16
'AT' and 'TA' are essentially the same, and I'd like to combine (add) the rows to reflect
2009 Apr 07
1
Pulling data into a model
I'm creating an ANOVA model. Is there a way to pull in consecutive columns of variables for the test?
Example: aov1<-aov(y~x1+x2+REG[,2:num], data=REG)
I'm not looking for interaction effects, I just want to create a model for the first few columns of variables (exact number and names will vary) and a few other predetermined variables (in the example I named them x1 and x2).
Thanks
2009 Mar 25
1
Hopefully a simple question
What am I missing here? Both of my column headers in the 'FREQ' table are found in the 'genotype'; however, they aren't being recognized.
> colnames(FREQ)
[1] "X17362526" "X17362627"
> colnames(genotype)
[1] "X17362311" "X17362316" "X17362346" "X17362420" "X17362421" "X17362422"
2007 Jan 24
2
keep track of selected observations over time
Dear all,
Attached is a description of my data, graph and the problem which I need help with. Hope you have time to open the file and help me out.
Many thanks,
Jenny
---------------------------------
2011 Feb 04
1
GWAF package: lme.batch.imputed(): object 'kmat' not found
Hello, All,
GWAF 1.2
R.Version() is below.
system(lme.batch.imputed(
phenfile = 'phenfile.csv',
genfile = 'CARe_imputed_release.0.fhsR.gz',
pedfile='pedfile.csv',
phen='phen1',
covar=c('covar1','covar2'),
kinmat='imputed_fhs.kinship.RData',
outfile='imputed.FHS.IBC.GWAF.LME.output.0.txt'
))
Gives the error messages:
Error in
2009 Oct 26
1
regular expressions
Dear list,
I have the following text to parse (originating from readLines as some
lines have unequal size),
st = c("START text1 1 text2 2.3", "whatever intermediate text", "START
text1 23.4 text2 3.1415")
from which I'd like to extract the lines starting with "START", and
group the subsequent fields in a data.frame in this format:
text1 text2
2010 Oct 21
2
nested anova
Hello all,
Can any of you R gurus help me out? I?m not all that great at stats to
begin with, and I?m also learning the R ropes (former SAS user).
Here?s what I need help with? I have a nested sample design and ran a
nested anova, but I don?t know how to interpret the results
habitat (four different types) is nested in site (three types), and site is
nested in gear (two types)
2011 Oct 04
1
Question about linear mixed effects model (nlme)
Hi,
I applied a linear mixed effect model in my data using the nlme package.
lme2<-lme(distance~temperature*condition, random=~+1|trial, data) and then
anova.
I want to ask if it is posible to get the least squares means for the
interaction effect and the corresponding 95%ci. And then plot this values.
Thank you
Panagiotis
--
View this message in context:
2010 Mar 29
1
how to prove that the factor makes no difference
Dear R-helper,
Please suggest some methods for my question below.
We measured the amount of protein A in patient blood in pre-treatment and
post-treatment condition from 32 patients.
--------------------------------------------
Pre-treatment Post-treatment
Pat1 25 28
Pat2 19 15
Pat3 94
2009 Dec 03
3
Three-dimensional (3D) movement using 'R'
Hi Everyone,
I have a question regarding the construction of 3D graphs in 'R', BUT
these graphs also need to illustrate movement (with time) of the
prostate gland (using radiological techniques). I am not sure how to do
this in 'R' although I'm sure there is some way of doing it.
Below, I have copied and pasted some of the data with which I'm working
on. The data
2005 Nov 16
1
PPC package-ppc.read.raw.nobatch (PR#8316)
Full_Name: Martin O'Gorman
Version:
OS:
Submission from: (NULL) (84.176.63.149)
I have been looking at the PPC package and have a question. As the input data is
comma separated, shouldn?t the command to read in the raw (no batch) mass spec
data indicate that sep=?,? (marked below) ? Otherwise, the data read in is the
pair of values (m/z,intensity). It is not obvious why that should be.
2006 Aug 15
0
Help with workaround for: Function '`[`' is not in thederivatives table
Earl F. Glynn asks:
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Earl F. Glynn
> Sent: Tuesday, 15 August 2006 8:44 AM
> To: r-help at stat.math.ethz.ch
> Subject: [R] Help with workaround for: Function '`[`' is not in
thederivatives table
>
> # This works fine:
> > a <- 1
2006 Oct 25
1
Quantile Regression
Hi,
how is it possible to retrieve the corresponding tau value for each observed data pair (x(t) y(t), t=1,...,n) when doing a quantile regression like
rq.fit <- rq(y~x,tau=-1).
Thank you for your help.
Jaci
--
2007 Jan 25
1
X-UID gaps cause Dovecot/IMAP to hang
Hi,
When the Dovecot 1.0.rc19 IMAP server encounters X-UID headers with
gaps in them, it hangs indefinitely. I've attached a sample mailbox (in
mbox format) which repeatably exhibits this behavior. The mbox contains
only three messages with the following X-UIDs in order: 774, 785, 787.
If I remove the X-UID headers from each message, Dovecot handles the
mailbox without any problems. UW-IMAP
2009 Apr 22
2
Exporting objects plotted with plot3d() - rgl package
Dear all,
Can anybody tell me how to export a 3d figure made with the plot3d
function? I'm careless about whether it's still interactive or not in
another format, as long I can get it out of R.
Thanks!
Alejandro Gonz?lez
Departamento de Biodiversidad y Conservaci?n
Real Jard?n Bot?nico
Consejo Superior de Investigaciones Cient?ficas
Claudio Moyano, 1
28014 Madrid, Spain
Tel +0034