Displaying 20 results from an estimated 8000 matches similar to: "Help to find only one class and differennt class"
2005 Mar 29
1
Mosaicplot with different colors
This dataset below is one sample answer the questioner from our customer.
> testbank <- read.table("testbank.txt", header=T)
> testbank
age married income gender ownhouse class
1 20-30 no high female yes 1st
2 30-40 no high female yes 1st
3 40-50 no low female yes 1st
4 50-60 no high female yes 1st
5 60-70
2005 Apr 19
1
How to make combination data
Dear R-user,
I have a data like this below,
age <- c("young","mid","old")
married <- c("no","yes")
income <- c("low","high","medium")
gender <- c("female","male")
I want to make some of combination data like these,
age.income.dat <- expand.grid(age,
2006 Jul 23
3
ANN: scoped_proxy plugin
ScopedProxy uses with_scope and proxy objects to make it easy to find and
count different types of records.
Example:
class Person < ActiveRecord::Base
scoped_proxy :minor, :conditions => ''age <= 17''
scoped_proxy :adult, :conditions => ''age >= 18''
scoped_proxy :old, :conditions => ''age >= 70''
scoped_proxy :male,
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 =
2024 Aug 02
1
grep
?s 02:10 de 02/08/2024, Steven Yen escreveu:
> Good Morning. Below I like statement like
>
> j<-grep(".r\\b",colnames(mydata),value=TRUE); j
>
> with the \\b option which I read long time ago which Ive found useful.
>
> Are there more or these options, other than ? grep? Thanks.
>
> dstat is just my own descriptive routine.
>
> > x
> ?[1]
2024 Aug 02
2
grep
Good Morning. Below I like statement like
j<-grep(".r\\b",colnames(mydata),value=TRUE); j
with the \\b option which I read long time ago which Ive found useful.
Are there more or these options, other than ? grep? Thanks.
dstat is just my own descriptive routine.
> x
?[1] "age"????????? "sleep"??????? "primary"????? "middle"
?[5]
2005 Nov 12
1
how to make automatically each level from data.frame to vector
Dear R-helpers,
Suppose I have dataset like this below:
data(HairEyeColor)
dfHEC <- as.data.frame(as.table(HairEyeColor))
my.dfHEC <- data.frame(Hair=rep(dfHEC$Hair,dfHEC$Freq),
Eye=rep(dfHEC$Eye,dfHEC$Freq),
Sex=rep(dfHEC$Sex,dfHEC$Freq))
my.dfHEC
my.dfHEC$Hair
my.dfHEC$Eye
my.dfHEC$Sex
and I know all levels for Hair, Eye and Sex.
In my case, I
2008 Jan 29
2
A good way to store some profile-information?
What would be a good way to store profile-information, in the cases
where the information can be selected from a list of choices? i.e.
gender (male,female), religion or marital status.
The lists don''t change, so putting that in the db doesn''t seem like a
good idea, but how do i put something like this in a model?
--~--~---------~--~----~------------~-------~--~----~
You received
2007 Mar 08
1
how to assign fixed factor in lm
Hi there,
> Value=c(709,679,699,657,594,677,592,538,476,508,505,539)
> Lard=rep(c("Fresh","Rancid"),each=6)
> Gender=rep(c("Male","Male","Male","Female","Female","Female"),2)
> Food=data.frame(Value,Lard,Gender)
> Food
Value Lard Gender
1 709 Fresh Male
2 679 Fresh Male
3 699 Fresh
2004 Jun 22
3
Regression Modeling query
Hi All
I received a raw data set with one record per tennis player (both male and
female) and then i cured it by aggregation i.e by 4 age groups, 2 gender
levels and 6 income levels. Gender and Income are categorical variables.
Please advise me how to use 'R' to model this data set (Actually, i want to
know the right regression technique and steps to do that, including removing
2011 Jan 23
2
Creating subsets of a matrix
Hello,
Say I have 2 columns, bmi and gender, the first being all the values and the
second being male or female. How would I subset this into males only and
females only? I have searched these fora and read endlessly about select[]
and split() functions but to no avail. Also the table is not ordered.
bmi gender -> bmi gender + bmi gender
1 24.78 male
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
2023 Nov 04
2
I need to create new variables based on two numeric variables and one dichotomize conditional category variables.
I might have factored the gender.
I'm not sure it would in any way be quicker. But might be to some extent
easier to develop variations of. And is sort of what factors should be
doing...
# make dummy data
gender <- c("Male", "Female", "Male", "Female")
WC <- c(70,60,75,65)
TG <- c(0.9, 1.1, 1.2, 1.0)
myDf <- data.frame( gender, WC, TG )
#
2008 Nov 17
5
how to calculate another vector based on the data from a combination of two factors
Hi,
I have a data set similar to the following
State Gender Quantity
TX Male 1
NY Female 2
TX Male 3
NY Female 4
I need to calculate cumulative sum of the quantity by State and Gender. The
expected output is
State Gender Quantity CumQuantity
TX Male 1 1
TX Male 3 4
NY Female 2 2
NY Female 4 6
I highly appreciate if someone can give me some hints on solving that in R.
Hao
--
View this
2008 May 02
1
Cant resolve Error Message
Hi,
Im having trouble creating the following graph. Here is my code:
library(plotrix)
library(prettyR)
female_improvement
<-read.table("C://project/graphs/gender/breakdown/gender-improvement/female-improvement.csv",
sep=",", header=TRUE)
barp(rbind(rep(length(female_improvement$gender),2),freq(female_improvement$reason)[[1]]),
ylab="22 Males participated in the
2012 Jan 27
1
Horizontal stacked 100% bars with ggplot2
Hello, R friends,
I'm trying to crack this nut:
Example Data.
pet gender
dog male
dog female
dog male
cat female
cat female
cat male
Plot Task.
Horizontal 100% bars where
y axis shows gender factor (male vs. female)
and x axis shows percentage of kind of pets (dog vs. cat)
so that % dogs + % cats are stacked in 1 bar and sum up to 100% (for each gender group 1
2012 Jul 18
3
Mean of matched data
Hi
I think/hope there will be a simple solution to this but google-ing has
provided no answers (probably not using the right words)
I have a long data frame of >2 000 000 rows, and 6 columns. Across this
there are 24 000 combinations of gene in a column (n=12000) and gender in a
column (n=2... obviously). I want to create 2 new columns in the data frame
that on each row gives, in one column
2023 Nov 05
1
I need to create new variables based on two numeric variables and one dichotomize conditional category variables.
There are many techniques Callum and yours is an interesting twist I had not considered.
Yes, you can specify what integer a factor uses to represent things but not what I meant. Of course your trick does not work for some other forms of data like real numbers in double format. There is a cost to converting a column to a factor that is recouped best if it speeds things up multiple times.
The
2008 May 04
2
Ancova_non-normality of errors
Hello Helpers,
I have some problems with fitting the model for my data...
-->my Literatur says (crawley testbook)=
Non-normality of errors-->I get a banana shape Q-Q plot with opening
of banana downwards
Structure of data:
origin wt pes gender
1 wild 5.35 147.0 male
2 wild 5.90 148.0 male
3 wild 6.00 156.0 male
4 wild 7.50 157.0 male
5 wild 5.90
2013 Jun 15
2
quick Help needed
Hi,
i am new to this forum and not sure how it works,
I am trying to do deskriptive descripe my data in terms of gender:
head(scltotal)
pbnr dat dep dys sop ago mis age female messpunkt2
messpunkt1 tage eintrittsjahr
1 10023 1994-02-21 0.75 1.00 0.50 0.50 0.75 35 1 8817
8817 0 1994
2 10023 1994-05-25 0.75 1.00 0.50 0.50 0.75 35 1 8910
8817