Displaying 20 results from an estimated 10000 matches similar to: "Remove Indeterminate Level"
2008 Sep 06
2
Hopefully an easy error bar question
Hi im trying to add error bars to my barplots, there very basic, i have a few grapghs where the y variable is different but on all the X variable is Age (Adult and Juvenile) however this is split into two levels so i have males and females, so my graph basically has four bars on it.
I know how to add eror bars for instance when there is only one level eg lookng at the diffrence between male and
2004 Oct 20
2
Replacing data from one data frame to another
Hi,
I have a data frame which contains two fields, 'prev' and 'mchnum'.
I have another data frame which also contains 'mchnum' and 'prev' and
some other fields. The 'prev' data in this field is corrupted and I
want to replace it with the data from the other data frame for matching
values of 'mchnum' (which are unique). Is there an easier way of
2004 Aug 25
5
Adding labels to variables
Hi,
Is it possible to add labels to variables in R (so as to have a better
description of what the variables represent)?
Thanks,
Neil
2003 Apr 08
2
use of variable labels
The R documentation for some of the foreign package's functions says
that the set of variable labels becomes attributes in the resulting
data frame.
Thus, e.g., 5="strongly agree", 4="agree", etc.
I'm happy that the labels are being passed, but unfortunately, when
R summarizes the data, it will list it only as categories, and
doesn't deal with the
2011 Mar 15
1
indeterminate for loop
Hello,
I have written a 'for' loop which on the first run makes nearest neighbour
calculations for my dataset 'A' in relation to dataset 'B', then based on
these results, some of the rows from A are moved into dataset B, and the
calculation is repeated on the remaining rows in A. Therefore a smaller and
smaller amount of data is analysed as the loop proceeds, since A
2009 Jan 22
2
Converting ddf/dct/sas data definition file to R
Dear all,
I was wondering whether anyone knows about a program which converts
(part of) a data definition file (such as a .dct file for stata, or
.sas file for sas) into an R-script.
Here is an example with a .sas file:
<-- snipp
VALUE HTYPE (default=32)
0 = "Not in household"
1 = "Married couple family household"
2 =
2005 Jul 19
2
using argument names (of indeterminate number) within a function
Although I tried to find an answer in the manuals and archives, I cannot
solve this (please excuse that my English and/or R programming skills
are not good enough to state my problem more clearly):
I want to write a function with an indeterminate (not pre-defined)
number of arguments and think that I should use the "..." construct and
the match.call() function. The goal is to write
2003 Dec 17
5
beginner programming question
Hi all,
The last e-mails about beginners gave me the courage to post a question;
from a beginner's perspective, there are a lot of questions that I'm
tempted to ask. But I'm trying to find the answers either in the
documentation, either in the about 15 free books I have, either in the
help archives (I often found many similar questions posted in the past).
Being an (still actual)
2009 Jun 03
2
Create a time interval from a single time variable
I am trying to set up a data set for a survival analysis with time-varying covariates. The data is already in a long format, but does not have a variable to signify the stopping point for the interval. The variable DaysEnrolled is the variable I would like to use to form this interval. This is what I have now:
ID Age DaysEnrolled HAZ WAZ WHZ Food onARV
2005 Dec 24
2
grouping data
Hello R-users/experts,
I am new to R-
I have a simple question:
Let say I have a data set as follows
temp:[file attached]
the data structure is a follows:
sex age
female 28
female 53
female 53
female 36
male 42
male 29
male 43
male 36
male 41
Here we are grouping all male value into male and all female value in to
female
2008 Feb 12
3
help with bwplot
Dear list,
I have following data set, which I want to plot the "Scale" variable on the
x-axis and "Mean"´on the y-axis for each Ageclass and for each sex. The Mean
value of each Ageclass for each sex would be connected by a line. Totally,
there should be 6 lines, from which three present the Mean values of each
Ageclass for respective sex. Are there any easy ways to do
2009 Oct 11
3
Error in family$family : $ operator is invalid for atomic vectors
Dear List,
I'm having problem with an exercise from The R book (M.J. Crawley) on page
567.
Here is the entire code upto the point where I get an error.
data(UCBAdmissions)
x <- aperm(UCBAdmissions, c(2, 1, 3))
names(dimnames(x)) <- c("Sex", "Admit?", "Department")
ftable(x)
fourfoldplot(x, margin = 2)
dept<-gl(6,4)
sex<-gl(2,1,24)
2010 Sep 10
3
(no subject)
Hello,
I'm trying to do bar plot where 'sex' will be the category axis and
'occupation' will represent the bars and the clusters will represent
the mean 'income'.
sex occupation income
1 female j 12
2 male b 34
3 male j 22
4 female j 54
5 male b 33
6
2012 Sep 05
2
Recoding categorical gender variable into numeric factors
I currently have a data set in which gender is inputed as "Male" and "Female"
, and I'm trying to convert this into "1" and "0".
I found a website which reccomended using two commands:
data$scode[data$sex=="M"] <- "1"
data$scode[data$sex=="F"] <- "2"
to convert to numbers, and:
data$scode <-
2010 Oct 29
2
wilcox.test; data type conversion?
I'm working on a quick tutorial for my students, and was planning on
using Mann-Whitney U as one of the tests.
I have the following (fake) data
grade <- c("MVG", "VG", "VG", "G", "MVG", "G", "VG", "G", "VG")
sex <- c( "male", "male", "female", "male",
2010 May 07
2
extract required data from already read data
Hi all,
I have data like this:
>sample <- read.csv(file="sample.csv",sep=",",header=TRUE)
> sample
stdate Domain sex age Login
1 01/11/09 xxx FeMale 25 2
2 01/11/09 xxx FeMale 35 4
3 01/11/09 xxx Male 18 30
4 01/11/09 xxx Male 31 3
5 02/11/09 xxx Male 32 11
6 02/11/09 xxx Male 31 1
7 02/11/09
2006 Dec 12
1
strings as factors
Hi,
To be able to match cases with a benchmark I need to have a data.frame with
a character id variable. however, I am surprised why this seems to be so
hard. In fact I was unable to succeed. Here is what I tried:
>test1 <-expand.grid(ID = 1:2, sex = c("male","female"))
>is(test1[,2])
[1] "factor" "oldClass"
>test2 <-expand.grid(ID =
2011 Feb 10
1
about prediction with a factor
Hi,
I don't know how to make prediction with a factor in the linear model.
Say
yd=c(1,2,3,4,5)
> sl=c(2,3,4,5,6)
> sex=c("male","male","female","female","male")
> sex=factor(sex)
> m=lm(sl~yd+sex+sex:yd)
How to make a prediction with new data like yd=c(4,5,6,7,8) for male and
female separately ?
Thank you very
2010 Jul 31
3
I have a problem
dear£º
in the example£¨nomogram£©£¬I don't understand the meanings of the program which have been marked by red line.And how to compile the program(L <- .4*(sex=='male') + .045*(age-50) +
(log(cholesterol - 10)-5.2)*(-2*(sex=='female') + 2*(sex=='male'))).
n <- 1000 # define sample size
set.seed(17) # so can reproduce the results
age <- rnorm(n, 50, 10)
2003 Jun 12
9
Programcode and data in the same textfile
I have the following problem. It is not of earthshaking importance,
but still I have spent a considerable amount of time thinking about
it.
PROBLEM: Is there any way I can have a single textfile that contains
both
a) data
b) programcode
The program should act on the data, if the textfile is source()'ed
into R.
BOUNDARY CONDITION: I want the data written in the textfile in exactly