similar to: HSAURtable question

Displaying 20 results from an estimated 1000 matches similar to: "HSAURtable question"

2010 Sep 19
1
odds ratios for n-way tables: seeking an *apply-able method
I'm looking for a way to generalize the calculation of (log) odds ratios for 2 x 2 x {strata} frequency tables in vcd::oddsratio() to R x C x {strata} tables. For an R x C table, F, odds ratios can be defined in several ways; one simple way, particularly for tables with ordered factors, is to calculate the set of continuation odds ratios, based on the (R-1)x(C-1) set of 2x2 tables with
2003 Jun 13
0
mca & contingency tables - error: "All variables must be factors"
Hi, I would like to do a multiple correspondence analysis with the mca function in the MASS library on data that I have as a contingency table (which I've tried converting to a data frame). For example, ========= > data(HairEyeColor) > hair.df <- as.data.frame(HairEyeColor) > hair.df Hair Eye Sex Freq 1 Black Brown Male 32 2 Brown Brown Male 38 3 Red
2011 Feb 18
3
How to change dataframe to tables
The data is in the attachment. What I wanna get is: , , Sex = Male Eye Hair Brown Blue Hazel Green Black 32 11 10 3 Brown 53 50 25 15 Red 10 10 7 7 Blond 3 30 5 8 , , Sex = Female Eye Hair Brown Blue Hazel Green Black 36 9 5 2 Brown 66 34 29 14 Red 16 7 7 7 Blond 4
2006 Dec 06
2
vcd package, assoc()
Hello, I am trying to use the extended assocplot() function: assoc(), from vcd package. Trouble is that it cannot even run its own examples on my installation. I get this output: $> example(assoc) assoc> data("HairEyeColor") assoc> (x <- margin.table(HairEyeColor, c(1, 2))) Eye Hair Brown Blue Hazel Green Black 68 20 15 5 Brown 119 84 54
2010 Oct 03
1
plyr: a*ply with functions that return matrices-- possible bug in aaply?
I have an application where I have a function to calculate results for a 2-way table or matrix, which returns a matrix with one less row and column. To keep this short, the function below captures the structure: fun2way <- function(f){ if (!length(dim(f)) ==2) stop("only for 2-way arrays") R <- dim(f)[1] C <- dim(f)[2] f[1:(R-1), 1:(C-1)] } Now, I want to
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
2009 Dec 15
2
Diagonal Labels on "Beside" Bars in Barplot
My question is based on an example provided in the following: Referencing: Statistics with R Vincent Zoonekynd <zoonek at math.jussieu.fr> 6th January 2007 URL: http://zoonek2.free.fr/UNIX/48_R/all.html data(HairEyeColor) a <- as.table( apply(HairEyeColor, c(1,2), sum) ) # Provided Example barplot(a, beside = TRUE, legend.text = attr(a, "dimnames")$Hair) # I
2002 Jan 30
1
mosaicplot(formula, data)--- bugged?
I have been tinkering with mosaicplot() and friends as a way of learning R. As part of this, I've written a pair.table() method for mosaic matrices, and would like to extend mosaicplot to work with loglin and logln (MASS) objects. I'm using R 1.4.0 on Win 98. I've been trying to figure out the formula interface, and think there's a bug, but not sure how to find it, yet alone fix
2013 May 09
0
Replace rows in dataframe based on values in other columns
Hi, dat1<- read.table(text=" Restaurant owner purchase_date ??????????? 23 Chuck 3/4/2011 ??????????? 23 Chuck 3/4/2011 ??????????? 23 Chuck 3/4/2011 ??????????? 23 Chuck 3/4/2011 ??????????? 23 Bob??????? 1/1/2013 ??????????? 23 Bob??????? 1/1/2013 ??????????? 23 Bob???????? 1/1/2013 ??????????? 15 Hazel 4/11/2010 ??????????? 15 Hazel 4/11/2010 ??????????? 15 Hazel 4/11/2010 ???????????
2002 Feb 08
2
bugs or imperfect implementation?
I am using R to teach, and here are a couple of things that I thought would work didn't work. 1. I noticed the utility data(***,package=***) recently and like it very much, but unless I type in the whole word "package" I'll get an error in 1.4.0. For example, data(cats,package=MASS) works fine but data(cats,pac=MASS) doesn't. 2. drop1 doesn't seem to be as smart as
2010 Jun 06
1
I need help in analyzing
I'm sory for my weak english. I need to analyze this subject : x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 y 0 0 1 0 0 1 0 0 1 0 czarne 1 1 0 0 0 0 1 0 0 0 rude 0 0 1 0 0 1 1 0 0 0 braz 0 0 1 0 1 0 1 0 0 0 blond 1 0 0 0 0 1 0 0 0 1 rude 1 1 0 0 0 0 0 0 0 1 blond 0 0 1 1 0 0 0 0 1 0 czarne 1 0 0 1 0 0 1 0 0 0 blond 0 0 1 0 0 1 1 0 0 0 blond 1 0 0 0 0 1 1 0 0 0 czarne 0 0 1 0 0 1 0 0 0 1 czarne 1 0 1 0 0 0
2013 Aug 18
1
How does R_UnboundValue and removing variables work?
Reading "R Internals" made me believe that R_UnboundValue was a placeholder that would be skipped over in variable lookup. viz. the section of R Internals "Hash tables" says "items are not actually deleted but have their value set to R_UnboundValue.", which seems to align with what I read in envir.c. So, I reasoned, if I have a function that returns R_UnboundValue,
2010 Oct 29
2
make many barplot into one plot
Dear R users I would like to group my barplot graph (see example on the R help link). The proposed R code, adding individual bars to the plot, looks really overwhelming. My specific dataset just consists of five groups and three different levels within each groups (the individual bars). The .txt file is read as matrix (horizontal: group, vertical: levels). The R trellis barchart (function
2020 Jan 18
1
How to get an object name from C?
(earlier I sent it as html by mistake). Hi, How can I get from C an object name used as a function argument? I have sample code in C that gives me access to the name of the function being called: SEXP xname(SEXP x) { const char *fun_name = CHAR(PRINTNAME(CAR(x))); x = CDR(x); const char *arg_name = isNull(TAG(x)) ? "" : CHAR(PRINTNAME(TAG(x)));
2006 Dec 01
3
Make many barplot into one plot
Dear all, ## I have 4 tables like this: satu <- array(c(5,15,20,68,29,54,84,119), dim=c(2,4), dimnames=list(c("Negative", "Positive"), c("Black", "Brown", "Red", "Blond"))) dua <- array(c(50,105,30,8,29,25,84,9), dim=c(2,4), dimnames=list(c("Negative", "Positive"),
2015 Feb 11
2
[PATCH] Fix for client certificate validation does not work
Hi all, As I reported earlier (with a typo in the work [BUG]) client certification validation *does not* work even if you do everything exactly according to all documentation and attempts at helpful advice. I have seen this issue with both startssl.com and self-signed certificates, and based on what I've seen from searching the web, this is a problem that has gotten little attention because
2008 Sep 26
2
adjusting textsize and spacing in mosaic (vcd package)
I'm trying to find a way to change the font size in a mosaic plot (the grid version, not the base graphics one). Here's an example to demonstrate: #Basic plot library(vcd) mosaic(HairEyeColor, shade = TRUE) #Bad first guess: this stops the default cell colouring, and doesn't change the font size mosaic(HairEyeColor, shade = TRUE, gp=gpar(fontsize=16)) #This successfully changes
2005 May 13
0
randomForest partialPlot x.var through function
All, I'm trying to set up a function which calls the partialPlot function but am getting an error that I can't seem to solve. Here's a simplified version of the function and error... > pplot <- function(rf,pred.var){partialPlot(x=rf,pred.data=acoust,x.var=pred.var)} > > attach(acoust) > acoust.rf <-
2003 Oct 30
0
loglm() uses only a reference to data, and not data itsel f - is that on purpose??
loglm() is a port of an original written for S-PLUS. The fact that it carries only a reference to the data frame is neither intentional nor unintentional, but an unnoticed side-effect. I can see advantages both ways. (I'm not so sure, either, that what you say is standard behaviour for model fitting functions really is so universal.) It would not be too hard to come up with a version that
2002 Sep 13
1
[R] proposal: mosaicplot with sub and las
Two proposals for mosaicplot(): - The argument "sub" should not be ignored. Example: mosaicplot( HairEyeColor, sub = 'test of sub' ) - To be able to discern also longer axis labels the argument "las" or par(las=2) should not be ignored. Example: mosaicplot( HairEyeColor, las=2 ) Thanks Wolfram