similar to: Tabulating

Displaying 20 results from an estimated 2000 matches similar to: "Tabulating"

2002 Oct 02
4
Introduction of NA:s
Hello, I wonder if someone could help me with the following: I have generated 10 000 values from rnorm and now I want to randomly replace 500 of those with NA. The problem is that values indexed between 6-10,16-20,26-30.... only should be considered for replacement. Any suggestions? Patrik Waldmann -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing
2004 May 12
6
Design matrix not identity
Hello again, I was too quick before. What I was looking for was a function that constructs the design (or incidence) matrix (X in a linear model) from a factor. Uwe Ligges suggested using model.matrix and this does almost what I want, but it is first necessary to construct a data variable. It also asigns ones to all rows of the first column (because this is set to be the contrast, not really what
2000 Jul 26
3
Correlation matrices
Hello, are there any good methods in R that will test if two correlation matrices (obtained in different ways) are equal? Something better than the Mantel test would be preferable. Regards, Patrik Waldmann -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info",
2012 Jan 19
1
snow - bootstrapped correlation ranking
I wonder if someone could help me adjusting the following code to parallelized snow code: #Creating a data set (not needed to be parallel) n<-100 p<-100 x<-matrix(rnorm(n*p),p) y<-rnorm(n) # Bootstrapping nboot<-1000 alpha<-0.05 rhoboot <- array(0, dim=c(p,nboot)) bootranks <- array(0, dim=c(p,nboot)) bootsamples <- array( floor(runif(n*nboot)*n+1), dim=c(n,nboot)) for
2003 Jun 04
1
Mode of MCMC chain
Hello, are there any functions in R for estimation of the mode of a MCMC-chain? Best, Patrik Waldmann [[alternate HTML version deleted]]
2000 Mar 23
1
NLME and NA:s
Hello, I have an unbalanced data set with some factors and several variables. The missing values are spread unequally over the variables. Because of the unbalanced structure have i tried NLME, but I cannot understand how I should set up the na.omit. I would not like to use na.omit before setting up the model, as that would exclude too many observations (on the whole structure). Lets say I have
2000 Apr 28
3
Matrix inverse
I haven't found a function that directly calculates the matrix inverse, does it exist? Otherwise what would be the fastest way to do it? Patrik Waldmann -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the
2002 Dec 17
3
cleaning up after example()
Dear R-help, I find the example() function is extremely useful in many ways. However, there's a minor inconvenience: for long examples, it leaves lots of objects in the workspace. While it's sometimes useful to have the objects around for further exploration, other times they just add to the clutter. Does anyone have a good way of cleaning up afterward? If not, would R core consider
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
2009 Oct 02
3
Tabulating using arbitrary numbers of factors
Dear R-help, First of all, thank you VERY much for any help you have time to offer. I greatly appreciate it. I would like to write a function that, given an arbitrary number of factors from a data frame, tabulates the number of occurrences of each unique combination of the factors. Cleary, this works: > table(horse,date,surface) <SNIP> , , surface = TURF
2011 Sep 20
1
Tabulating Baseline Characteristics on specific observations
I have a data set with many missing observations. When I run a regression, R of course discards the observations (the whole row) that have "NA". I want to tabulate some baseline characteristics (column means) but only for the observations that R used for the regression. I tried to recreate this data frame by using na.omit on the original data frame, but this will not work as this will
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 want the count to be like the above. Here, it is counting the
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
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
2007 Feb 18
11
Tabulation with ENTER key
Dear all, I think this can be interesting for others too. For a while I tried to solve that problem - how to tabulate with ENTER/RETURN key too and not only with TAB. You know the problem - you are entering a lot of numbers from numeric keypad but you need to go far left to press TAB. This prevents one-hand data entry and prohibits web apps to be used by accountants, for instance. Here is a
2006 Dec 31
3
tabulate: switching columns and rows
Hi all, Please, is there any way of controlling factors in row/columns when using ftable/xtabs? As far as I can see, the last cross-clasifing variable in the formula 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
2008 Jan 23
3
How to do more advanced cross tabulation in R?
Hi, I am trying to reproduce some functionalities of Excel pivot table in R, sadly, I couldn't figure out how to do it. I am wondering if this is even possible in R. Does anyone know? Here is an example: year=rep(2003,16) quarter=rep(1:4,each=4) sales=1:16 company=rep(c("a","b","c","d"),4) df=data.frame(year,quarter,sales,company) #this is the
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.
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]]
2010 Dec 20
2
tabulating 2 factors weighting by a third var
Hi, This must be an easy one but so far I haven't find a way out... I have a data frame such as: $ v1 : Factor w/ 5 levels $ v2 : Factor w/ 2 levels $ v3 : Class 'difftime' atomic [1:6666] basically v1 and v2 are factors, while v3 is a variable containing the duration of certain activities (values ranging from 11 to 45000 sec, no missing values) How can I get a table