search for: tabulation

Displaying 20 results from an estimated 465 matches for "tabulation".

2017 Nov 10
0
Calculating frequencies of multiple values in 200 colomns
Hi, To clarify the default behavior that Boris is referencing below, note the definition of the 'bin' argument to the tabulate() function: bin: a numeric vector ***(of positive integers)***, or a factor. Long vectors are supported. I added the asterisks for emphasis. This is also noted in the examples used for the function in ?tabulate at the bottom of the help page. The second
1999 Apr 03
2
tabulate causes segmentation fault (PR#156)
Peter, I thought this one was noted and fixed, but I could be wrong. R : Copyright 1999, The R Development Core Team Version 0.63.3 (March 6, 1999) .... [Previously saved workspace restored] > tabulate(1:10, 5) Process R:1 segmentation fault at Sat Apr 3 17:48:34 1999 -- (The following contact details become official on 1 May 1999, but the email
2017 Nov 10
2
Calculating frequencies of multiple values in 200 colomns
|> x <- sample(0:2, 10, replace = TRUE) |> x [1] 1 0 2 1 0 2 2 0 2 1 |> tabulate(x) [1] 3 4 |> table(x) x 0 1 2 3 3 4 B. > On Nov 10, 2017, at 4:32 AM, Allaisone 1 <allaisone1 at hotmail.com> wrote: > > > > Thank you for your effort Bert.., > > > I knew what is the problem now, the values (1,2,3) were only an example. The values I have are
2011 Mar 19
2
persuade tabulate function to count NAs in a data frame
Hi, I'd like to ask you a question again. It is basically about data frames, NAs and tabulate function. I have this data frame. I already used this in one of the previous questions of mine. It intentionally looks this simple, my real 'df' dataframe is much bigger actually and again, I am not willing to annoy anyone with huge databases... So, my database: id
2004 Oct 20
2
apply function
Hi all, I have a question about apply function. Is that possible to pass some non-default arguments in the function we want to apply ? For example: if "mat" is a matrix and I want to use the "tabulate" function on its row. The command apply(mat,1,tabulate) works but I have problem with this one apply(mat, 1, tabulate(nbins=4)). Any clue ? Thanks, Eric -- Eric
2009 Jul 20
1
tabulate can accept NA values?
tabulate has .C("R_tabulate", as.integer(bin), as.integer(length(bin)), as.integer(nbins), ans = integer(nbins), PACKAGE="base")$ans The implementation of R_tabulate has if(x[i] != R_NaInt && x[i] > 0 && x[i] <= *nbin) and so copes with (silently drops) NA. Perhaps the .C could have NAOK=TRUE? This is useful in apply'ing tabulate to
2008 Feb 29
2
Getting multiple tables when using table(dataframe) to tabulate data
I am having hard time tabulating data in a dataframe, and getting a single "table" for an answer. I am trying to tabulate all "counts" for given "status" on a given date. I have a data frame such as: delta_ts status count 1 2008-02-27 CLOSED 3 2 2008-02-27 NEW 56 3 2008-02-27 RESOLVED 5 4 2008-02-21 ASSIGNED 1 5
2010 Mar 29
0
Question on entry exit tabulating in any R finance package
I asked the question in Rmetrics subforum, but for some reason, almost two weeks later, it keeps saying I haven't been approved to post yet there. I'll try again here on the open forum. I wanted to have a script that tabulates results by trade. I.e. instead of tabulating each day as a trade event, you enter on one date, exit another, and simply tabulate metrics based on one trade period.
2010 Oct 03
1
tabulate() does not check for input bounds
Dear all, it looks like that tabulate() does not check for the bounds of the input. Reproducible example: > b <- 1:2 > tabulate(b[1:100]) [1] 1 1 > R.version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status Patched major 2 minor 11.1 year 2010 month 09 day
2006 Dec 31
3
tabulate: switching columns and rows
...will appear in columns. The previous ones, in rows. For instance, is it possible to make tension and replicate appear in columns? ftable(xtabs(breaks ~ wool + tension + replicate, data = warpbreaks)) After some years using SAS proc tabulate I am afraid I don't get the point with R and cross-tabulation :-( Thanks you very much and Happy New Year! Ricardo --- Ricardo Rodr?guez Your XEN ICT Team
2000 Jan 12
3
functions for flat file import/export + utilities
Dear R-Developers, please find attached a set of drafted functions for flat file import and export, partially extending existing functions, partially completely written as new code. I thought you might be interested in those functions and the accompanying utilities for padding and trimming. Main features are - supports several formats, i.e. fixed width and CSV (with one exception) - supports
2009 Oct 10
2
Tabulation
Hi all, I have a data set x1 x2 x3 1 2 1 1 2 3 2 1 2 1 2 1 3 1 1 I want to tabulate in the following way. 1 2 3 x1 3 2 1 x2 2 3 0 x3 3 1 1 It is just like frequency distribution Any help is highly appreciated [[alternative HTML version deleted]]
2003 Feb 28
3
Tabulating
...12,11,11,10,11)) and use the table function, which gives the following result 10 11 12 5 5 2 that''s fine, but what I would like to do now is: construct new classes based on the number of classes from table, 10 10, 11 11, 12 12, 10 11, 10 12, 11 12. After that I would like to do tabulation on the pairs in data, and positions in pairs should be unimportant: 10 11 should be treated as the same class as 11 10. So the following result should be obtained: 10 10, 11 11, 12 12, 10 11, 10 12, 11 12 1 , 1 , 0 , 2 , 1 , 2 Remeber that it should be possible to do for an arbitrary number of cla...
2009 Oct 28
1
Aggregate and cross tabulation
R-helpers: I have a data frame containing 4 factor variables (let's say A,B,C, and D) and 1 numerical variable (N). I would like to produce a cross-tabulated data frame in which A,B,C are individual columns, each factor of D is its own column, and the field is calculated as a given function of N (I would like to have two output data frames, one with the mean(N) and one with the
2017 Nov 09
2
Calculating frequencies of multiple values in 200 colomns
Always reply to the list. I am not a free, private consultant! "For example, if I have the values : 1 , 2 , 3 in each column, applying Tabulate () would calculate the frequency of 1 and 2 without 3" Huh?? > x <- sample(1:3,10,TRUE) > x [1] 1 3 1 1 1 3 2 3 2 1 > tabulate(x) [1] 5 2 3 Cheers, Bert Bert Gunter "The trouble with having an open mind is that people
2008 Jan 09
1
pairwise cross tabulation tables
Hi, I have a huge number of categorical variables, say at least 10000, and I put them into a matrix, each column is one variable. The question is: how can I make all of the pairwise cross tabulation tables efficiently? The straightforward solution is to use for-loops by looping two indexes on the table() function, but it was just too slow. Is there a more efficient way to do that? Any guidance will be greatly appreciated. Andy -- View this message in context: http://www.nabble.com/pairwise-...
2008 Sep 29
3
Cross-tabulation Question
Hi R, This is a cross tabulation question. Suppose that, > d=read.table("clipboard",header=F) > d V1 V2 V3 A One Apple A One Cake A One Cake B One Apple B One Apple B One Apple > table(d$V2,d$V3) Apple Cake One 4 2 But, I don't wan...
2017 Nov 10
0
Calculating frequencies of multiple values in 200 colomns
Thank you for your effort Bert.., I knew what is the problem now, the values (1,2,3) were only an example. The values I have are 0 , 1, 2 . Tabulate () function seem to ignore calculating the frequency of 0 values and this is my exact problem as the frequency of 0 values should also be calculated for the maf to be calculated correctly. ________________________________ From: Bert Gunter
2007 Feb 22
1
Cross-tabulations next to each other
I have the following relatively simple problem. Say we have three factors, and we want to create a cross-tabulation against each of the other two: x <- factor(rbinom(5, 1, 1/2)) y <- factor(rbinom(5, 1, 1/2)) z <- factor(rbinom(5, 1, 1/2)) table(x,y) table(x,z) This looks like: y x 0 1 0 2 0 1 1 2 z x 0 1 0 1 1 1 2 1 I would like to get (surely this will look a mess in non...
2017 Nov 18
3
Complicated analysis for huge databases
The loop : AllMAFs <- list() for (i in length(SeparatedGroupsofmealsCombs) { AllMAFs[[i]] <- apply( SeparatedGroupsofmealsCombs[[i]], 2, function(x)maf( tabulate( x+1) )) } gives these errors (I tried this many times and I'm sure I copied it entirely) :- Error in apply(SeparatedGroupsofmealsCombs[[i]], 2, function(x) maf(tabulate(x + : object 'i' not found > }