similar to: working with unequal rows

Displaying 20 results from an estimated 10000 matches similar to: "working with unequal rows"

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
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
2010 May 01
2
Average Login based on date
Hi All, I have the 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
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
2005 Jun 25
1
Confidence interval bars on Lattice barchart with groups
I am trying to add confidence (error) bars to lattice barcharts (and dotplots, and xyplots). I found this helpful message from Deepayan Sarkar and based teh code below on it: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/50299.html However, I can't get it to work with groups, as illustrated. I am sure I am missing something elementary, but I am unsure what. Using R 2.1.1 on various
2009 Mar 17
2
converting null to some values
Hi, I have newbie question. Suppose I have the following data: temp <- data.frame(type1 = c("male", "female", "male", "female", "female"), type2 = c("low", "med", "high", "low", "med"), a = c(1,2,4, NA, 3), b = .... [TRUNCATED] temp type1 type2 a b c 1 male low 1 5 0 2 female
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
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
2007 Dec 20
1
custom subset method / handling columns selection as logic in '...' parameter
Dear R-helpers & bioconductor Sorry for cross-posting, this concerns R-programming stuff applied on Bioconductor context. Also sorry for this long message, I try to be complete in my request. I am trying to write a subset method for a specific class (ExpressionSet from Bioconductor) allowing selection more flexible than "[" method . The schema I am thinking for is the following:
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
2016 Apr 24
3
Dividing rows in groups
Hi I have two data frames as shown below (second one is obtained by aggregating rows of similar IDs in df1.). They both have similar number of columns but rows of df2 are lesser than rows of df1. df1: ID A B 1 1 2 1 0 3 2 5 NA 2 1 3 3 1 4 4 NA NA 4
2005 Dec 20
1
Help to find only one class and differennt class
Dear R users, I have a problem, which I can not find a solution. Probably someone could help me? I have a result from my classification, like this > credit.toy [[1]] age married ownhouse income gender class 1 20-30 no no low male good 2 40-50 no yes medium female good [[2]] age married ownhouse income gender class 1 20-30 yes yes high male
2016 Apr 22
0
Finding Highest value in groups
Assuming your dataframe is in a variable x: > require(dplyr) > x %>% group_by(ID) %>% summarise(maxVal = max(Value,na.rm=TRUE)) On Fri, 2016-04-22 at 13:51 +0000, Saba Sehrish via R-help wrote: > Hi > > > I have two columns in data frame. First column is based on "ID" assigned to each group of my data (similar ID depicts one group). From second column, I
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 ) #
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 =
2009 Sep 11
3
Barplot+Table
I am trying to automate a report that my company does every couple of years for the state of Maine. In the past we have used SPSS to run the data and then used complicated Excel template to make the tables/graphics which we then imported into Word. Since there are 256 tables/graphics for this report, this work flow is a little painful. I would like to automate the process and I think I can do
2004 Jun 22
1
Grouped AND stacked bar charts possible in R?
Good day all, My statisticians want an R procedure that will produce grouped stacked barplots. Barplot will stack or group, but not both. The ftable function can produce a table of the exact form they want, but the barplot doesn't show all the divisions we want. For an example, here's the sample from the help file for "ftable:" data(Titanic) ftable(Titanic, row.vars = 1:3)
2016 Apr 22
2
Finding Highest value in groups
Hi I have two columns in data frame. First column is based on "ID" assigned to each group of my data (similar ID depicts one group). From second column, I want to identify highest value among each group and want to assign the same ID to that highest value. Right now the data looks like: ID Value 1 0.69 1 0.31 2 0.01 2 0.99 3 1.00 4 NA 4
2011 Feb 09
3
Need help merging two dataframes
Hi R users, I am trying to extract some attributes (age, sex, area) from dataframe "AB" that has 101,269 observations of 28 variables to dataframe "t2" that has 47 observations of 6 variables. They share a column called "id", which is a factor with 47 levels. I want to end up with a dataframe that has 47 observations of 9 variables (the original 6 variables of t2,
2017 Jun 22
2
duplicated factor labels.
>>>>> Paul Johnson <pauljohn32 at gmail.com> >>>>> on Fri, 16 Jun 2017 11:02:34 -0500 writes: > On Fri, Jun 16, 2017 at 2:35 AM, Joris Meys <jorismeys at gmail.com> wrote: >> To extwnd on Martin 's explanation : >> >> In factor(), levels are the unique input values and labels the unique output >>