similar to: Crosstab from sql dump

Displaying 20 results from an estimated 10000 matches similar to: "Crosstab from sql dump"

2012 Jul 20
3
Crosstab with Average and Count
I have the following data: x <- as.factor(c(1,1,1,2,2,2,3,3,3)) y <- as.factor(c(10,10,10,20,20,20,30,30,30)) z <- c(100,100,NA,200,200,200,300,300,300) I could create the cross tab of x and y with Sum of z as its elements using the xtabs function as follows: # X Vs. Y with Sum Z xtabs(z ~ x + y) y x 10 20 30 1 200 0 0 2 0 600 0 3 0 0 900 How do I replace
2009 Apr 24
4
omit empty cells in crosstab?
Perhaps this is a common question but I haven't been able to find the answer. I have data with many factors, each taking many values. However, only relatively few combinations appear in the data, ie have nonzero counts, in other words the resulting table is sparse. Say we have 10 factors each with 10 levels. The result of table() would exceed the memory space (on a 32bit machine). Is there
2011 Sep 07
0
3-Way Crosstab using survey package
Hello, I am wondering if it is possible, or what the correct way to code a three-way crosstab in R using the survey package? I have been using the following code to complete two way crosstabs, but have not seen any three-way code. Two-Way: svyby(~factor(a), ~factor(b), data, svymean) Thanks! Rachel [[alternative HTML version deleted]]
2006 Jul 06
2
Precedence of access parameters
hello all, im trying to figure out the precedence of security parameters in smb.conf. i know that settings in specific shares take precedence over settings in global; 'invalid users' takes precidence over all other security settings. but others im not so clear on, such as: does 'read only' take precedence over 'write list'? or do later entries simply overwrite earlier
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
2005 Aug 30
2
crosstab for n-way contingency tables
Dear list. New to R, I'm looking for a way of using crosstab to output low-dimensional (higher than 2) contingency tables (frequencies, per-cents by rows, % by columns, mean, quantiles....) I'm looking for something of the following sort dataframe: singers, categorical variates: voice category (soprano,mezzo-soprano, ...) , voice type( drammatic, spinto, lirico-spinto, lirico,
2000 Nov 21
1
S function crosstabs
Hello there, I'm quite new with R. Does anybody know a true variant in R of the Splus function "crosstabs" to create contingency tables, with the possibility of assigning a weight variable? Thanx Tim -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info",
2011 Apr 13
1
plotting line graphs for output from crosstabs function
Hi R-users, This is a generic question, is there a way to plot a line graph for the output from crosstable function? one of the inputs to the crosstab function is categorical. Taby -- [[alternative HTML version deleted]]
2002 Feb 13
3
xtabs
Hi, In Splus if I call the function crosstabs() the output is a contigency table; in each cell of the table is printed: N, N/RowTotal, N/ColTotal, N/Total. N is the number of observations in each cell. The same call to xtabs() in R will produce the contigency table but the only entry in each cell is N. How can I get the same relative frequencies that crosstabs() gives? Thanks, mike --
2012 Apr 04
0
crosstabs and histograms with flexible binning of dates
Hi, First, thank you to Duncan Mackay for getting me started processing dates with R. Unfortunately, I need to do a little more than I initially expected. I have 5K lines of data that look like this: ID AREA DATE 0001 Center 2010-10-15 0002 Center 2010-01-02 0003 NorthWest 2010-02-05 0004 SouthWest 2010-05-11 I would like to create a script to create crosstabs like
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.
2008 Apr 03
1
newbie subset question
I want to look at all the records making up a "row and column" of a crosstab, but I'm not getting it right. I'm trying to use subset() but my selection ((prod_act=="other") || (attr_act=="other")) gives my no records. See the second table below. Getting just the row does work, as seen in the third table. Why is this failing me? > .Table <-
2018 May 08
3
Bilateral matrix
or in base R : ?xtabs ?? as in: xtabs(~previous_location + current_location,data=x) (You can convert the 0s to NA's if you like) Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, May 8, 2018 at 9:21 AM, Huzefa
2018 May 08
2
Bilateral matrix
I have data on current and previous location of individuals. I would like to have a matrix with bilateral movement between locations. I would like the final output to look like the second table below. I have tried using crosstab() from the ecodist but I do not have another variable to measure the flow. Ultimately I would like to compute the probability of movement between cities (movement to
2012 Apr 19
2
suggested method to transform list to a matrix
I have data in the following list format: USER,VARIABLE,COUNT user1, var1, 3 user1, var2, 4 user2, var1, 7 userN, var12, 5 And would like to have it format as a matrix: var1 var2 var12 user1 3 4 user2 7 userN 5 What is the suggested method to do this for 1 million rows, with 12 variables and ~ 4,000 unique users? Thank you, Tim Stutt tim@ischool.berkeley.edu [[alternative
2018 May 16
0
Bilateral matrix
Dear Bert and Huzefa, Apologies for the late reply, my account got hacked and I have just managed to recover it. Thank you very much for your replies and the solutions. Both work well. I was wondering if there was any way to ensure (force) that all possible combinations show up in the output. The full dataset has 25 cities but of course people have not moved from Boston to all the other 24
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,
2018 May 08
0
Bilateral matrix
Dear Miluji, If I understand correctly, this should get you what you need. temp1 <- structure(list(id = 101:115, current_location = structure(c(2L, 8L, 8L, 3L, 6L, 5L, 1L, 2L, 7L, 4L, 2L, 8L, 8L, 3L, 6L), .Label = c("Austin", "Boston", "Cambridge", "Durham", "Houston", "Lynn", "New Orleans", "New York"), class =
2008 Feb 15
12
Transfer Crosstable to Word-Document
# Dear list, # I am an R-beginner and # spent the last days looking for a method to insert tables produced # with R into a word document. I thought about SPPS: copy a table from # an SPO-file and paste it into a word document # (if needed do some formatting with that table). # Annother idea was, to produce a TEX-file, # insert it and make it a word-table. # I found the following libraries, which
2018 May 16
2
Bilateral matrix
xtabs does this automatically if your cross classifying variables are factors with levels all the cities (sorted, if you like): > x <- sample(letters[1:5],8, rep=TRUE) > y <- sample(letters[1:5],8,rep=TRUE) > xtabs(~ x + y) y x c d e a 1 0 0 b 0 0 1 c 1 0 0 d 1 1 1 e 1 1 0 > lvls <- sort(union(x,y)) > x <- factor(x, levels = lvls) > y <-