similar to: Calculating column percentages of a table

Displaying 6 results from an estimated 6 matches similar to: "Calculating column percentages of a table"

2006 Sep 07
2
Axes of a histogram
Hello everyone, I would be glad if you could help out an R-beginner here... I have a vector of categorial data like this > v <- c(1, 1, 2, 2, 2, 3, 3, 4, 4, 4) When I do > hist(v) I get the x-axis of the histogram with floating point labels: 1.0, 1.5, 2.0, etc. Is it possible to tell R that the data consists of categories, i.e. that I only want the category names (1, 2, 3, 4) on my
2013 Jul 04
2
porcentajes
Buenos días quiero definir situación_2 <-tapply(ICE_3$FACTOR_CORR, list(X.1.1Eneltrimestrequeestáacabando=ICE_3$X.1.1Eneltrimestrequeestáacabando, CNAE_1=ICE_3$CNAE_1), f) donde f sea el porcentaje por filas (y/o el porcentaje por columnas) y las funciones rowPercent y colPercent me dan el siguiente error Error en tapply(ICE_3$FACTOR_CORR, list(X.1.1Eneltrimestrequeestáacabando =
2004 Nov 24
1
reshaping of data for barplot2
Dear All, I have the following data coming out from s <- with(final, summarize(norm, llist(gtt,fdiab), function(norm) { n <- sum(!is.na(norm)) s <- sum(norm, na.rm=T) binconf(s, n) }, type='matrix') ) ie gtt fdiab norm.norm norm.norm2 norm.norm3 18
2005 Oct 29
1
how to get colnames of a dataframe within a function called by 'apply'
Hello alltogether, how is it possible to assign the colnames of a data.frame to a function called by apply, e.g. for labeling a plot? Example: I want to plot several qqnorm-plots side by side and there should be a maintitle for each qqnorm-plot which is identical to the respective colname. I checked, but the column which is processed by the function called by apply does not contain a colname
2010 Nov 01
2
how to save this result in a vector
HI, Dear R community, I have the following codes to calculate the commulative coverage. I want to save the output in a vector, How to do this? test<-seq(10, 342, by=2) #cover is a vector cover_per<-function (cover) { for (i in min(cover):max(cover)) {print(100*sum(ifelse(cover >= i, 1, 0))/length(cover))} } result<-cover_per(test) > result NULL Can anyone help me this this?
2007 Apr 20
1
regarding 3d Bar Plot
Hi All R experts I have data in a two dimensional table. each row of the data adds upto 100 ( hence they are percentages ). it can be interpreted as like this A - I are the matches and P - X are the players. Thus Player P scored 20% of the runs during this season in Match C, 60% in Match D and remaining 20% in Match G. I want to plot 3-d bar plot, where X axis have players, Y axis have