Displaying 20 results from an estimated 700 matches similar to: "xtabs"
2002 Jul 27
1
R Code for X-Tab with Row/Col Proportions, Expected Vals and Tests
Recently, I noted a post and replies on R-Help from Professor Marc
Feldesman regarding a cross tabulation function that generates row and
column proportions, marginal values, expected cell values and tests for
independence presumably similar in a fashion to the output of the S-Plus
crosstabs() function or the SAS Proc Freq.
Martin Maechler had posted some code in reply for folks to update and
2005 Jun 23
1
the dimname of a table
i have a data frame(dat) which has many variables.and i use the following script to get the crosstable.
>danx2<-c("x1.1","x1.2","x1.3","x1.4","x1.5","x2","x4","x5","x6","x7","x8.1","x8.2","x8.3","x8.4","x11",
2004 Jul 01
1
xtabs
I'm running 1.9.1 on Mac OS X 10.1.
My simple question is whether there is a crosstabs-like command (I know
about "xtabs" which is much like "table") that computes not only cell
counts but also row, column, and cell percents. Something like
crosstabs(~x+y) in S-PLUS.
Thank you.
2003 Sep 03
2
lme in R and Splus
Good Day,
Included below is some code to generate data and to fit a mixed effects
model to this fake data. The code works as expected when I call the
function "lme" in Splus but not in R.
The error message from calling lme in R is:
"Error in getGroups.data.frame(dataMix, groups) :
Invalid formula for groups"
I installed the nlme package for R around 20 August
2005 Jul 20
2
unable to call R t-test from Java
Hello,
My colleague and I would like to write Java code that invokes R to do a simple TTest. I've included my sample java code below. I tried various alternatives and am unable to pass a vector to the TTest method. In my investigation, I tried to call other R methods that take vectors and also ran into various degrees of failure. Any insight you can provide or other Web references you
2020 Sep 30
2
Creating a global variable for a struct array
Let me clarify my question.
I have a struct array h1 as follows:
dhash h1[10];
I want to get a Constant* to variable h1. It looks like I can use ConstantStruct::get(StructType*, ArrayRef<Constant *>) to do this.
My question is how to get the second argument of type ArrayRef<Constant *> from the above variable h1.
Thanks,
Chaitra
________________________________
From: Tim Northover
2009 Aug 22
3
Help on comparing two matrices
Hi,
I need to compare two matrices with each other. If you can get one of
them out of the other one by resorting the rows and/or the columns, then
both of them are equal, otherwise they're not. A matrix could look like
this:
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,] 0 1 1 1 0 1 1 0
[2,] 1 1 0 0 0 1 0 1
[3,] 1 0 1 0 0
2020 Oct 01
2
Creating a global variable for a struct array
Thank you very much. The code to initialize h1 to non-zero values was what I was looking for.
It's almost working except for a type mismatch wrt dlist* llist field of h1.
dlist static_lst[10] = { {1, 5, NULL}, ... };
dhash h1[10] = {{"myfile.txt", static_lst}, ... };
Along the lines of the code you had sent, I created a GlobalVariable* llist of type [10 x %struct.dlist]* for the
2010 Jul 16
2
Storing processed results back into original objects
Hi all,
There are matrices with same column names but arranged in different orders
and I desire columns of these matrices to have same order.
For example, below are 2 arbitrary data sets with columns arranged in
different order. I require columns of these to have same order as specified
in "columns" object and the results stored in the original object names.
I know this can be done
2011 Nov 28
5
window manager interface commands for linux
How can i replicate this in Linux:
source(file.choose())
I've tried source(tkgetOpenFile()) but with no luck
2020 Sep 22
2
Creating a global variable for a struct array
Hello,
I would like to create a global variable for the following struct array, h1
dhash* h1 = new dhash[10];
typedef struct dhash{
char* filenm;
dlist* llist;
}dhash;
typedef struct dlist{
int soffst;
int eoffst;
uint8_t* dptr;
}dlist;
I also need to allocate space for:
1) the field llist in struct dhash which is a pointer to another struct dlist and
2) the field
2008 Oct 01
1
knn class probabilities
Good Day,
I'm using the knn function in the package class. With k set to 3,
the function returns proportions of 1/3, 0.5, 0.6, 2/3, 3/4, and 1.0
for the test cases. I don't understand how with k set to 3 the
proportions can be anything other than 1/3, 2/3, or 1.0 I've seen
similar inconsistencies with k set to 5.
R version 2.5.0 with redhat linux.
Thanks in advance.
Mike
2012 Feb 10
1
stepwise variable selection with multiple dependent variables
Good Day,
I fit a multivariate linear regression model with 3 dependent variables and several predictors using the lm function. I would like to use stepwise variable selection to produce a set of candidate models. However, when I pass the fitted lm object to step() I get the following error:
Error from R:
Error in drop1.mlm(fit, scope$drop, scale = scale, trace = trace, k = k, :
no
2008 Nov 12
1
Crosstabs Output
Hi, I'm a new R user.
I noticed that RKWard has a really nice output when it does crosstabs. It
even includes the chi-squared values. However, I obviously can't simply copy
this into my standalone R script. Does anyone know the code or a way for me
to view the code.
Secondly, if I am writing an R script I want to be able to view the output
as a pdf even if my function is not a graph,
2000 May 17
1
crosstabs
Hi all!
What is the equivalent R function of SPLUS crosstabs?
Thank you.
Danar.
Stat. Inst. Umea Univ.
Umea, Sweden
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To:
2000 Feb 03
1
Merge?
I see that feature freeze for a better than ever R has been announced. May I
ask if there will be or could be "merge" function for data frames? I believe
it would be very nice if this were "centrally" implemented (with regard to
my humble steps to writing such a function and the related error and other
precautions). I know from VR2R.pdf (courtesy Profs. Venables and Ripley)
2003 Apr 24
3
Detailed contingency tables
Is there any existing function for creating contingency tables that will
display counts, row, column, and cell percentages in the same
tables....anything similar to crosstabs in S?
Marc W. Zodet, MS
Health Statistician
Center for Cost and Financing Studies
Division of Statistical Research and Methods
2101 East Jefferson Street, Suite 500
Rockville, Maryland 20852
Phone: 301-594-7072
Fax:
2000 Oct 24
2
Crosstabs function
Is there a crosstabs function like the one found in S-Plus available in any
of the R addon packages? I can't seem to locate anything other than the
chisq.test, which is adequate but does not yield the output customarily
required with any journal submission (in my field). (S-Plus, SPSS, SAS
all provide examples of the required output).
If there isn't such a function already
2008 Dec 22
2
How can I avoid nested 'for' loops or quicken the process?
Hi All,
I'm still pretty new to using R - and I was hoping I might be able to get
some advice as to how to use 'apply' or a similar function instead of using
nested for loops.
Right now I have a script which uses nested for loops similar to this:
i <- 1
for(a in Alpha) { for (b in Beta) { for (c in Gamma) { for (d in Delta) {
for (e in Epsilon)
{
Output[i] <-
2009 Apr 07
2
newbie query: simple crosstabs
I've been playing around with various table tools, trying to construct a
fairly simple cross-tab. It shouldn't be hard, but for some reason it
turning out to be (for me).
If I want to see how many men and how many women agree with a agree/disagree
question (coded 1,0), I can do this:
>attach(mydata)
>mytable <- table(male, q1.bin) # gender and a binary response variable