similar to: merge counts from table()

Displaying 20 results from an estimated 20000 matches similar to: "merge counts from table()"

2011 Nov 04
2
Reading parameters from dataframe and loading as objects
Hi List, I want to read several parameters from data frame and load them as object into R session, Is there any package or function in R for this?? Here is example param <-c("clust_num", "minsamp_size", "maxsamp_size", "min_pct", "max_pct") value <-c(15, 20000, 200000, 0.001, .999) data <- data.frame ( cbind(param , value)) data
2011 Sep 30
1
Hi
Hi, There is a question that I am confused. I have a set of data like this: hsa-miR-205--GATA3 0.797882767 1.08E-13 hsa-miR-205--ITGB4 0.750217593 1.85E-11 hsa-miR-187--PGF 0.797604155 3.24E-11 hsa-miR-205--SERPINB5 0.744124886 3.28E-11 hsa-miR-205--PBX1 0.734487224 7.89E-11 hsa-miR-205--MCC 0.72499934 1.80E-10 hsa-miR-205--WNT5B 0.717705259 3.33E-10 hsa-miR-200c--PKN2 0.721746815
2012 Jan 26
1
N Hosts on an Untrusted LAN in Full Mesh?
Hello, tinc experts! I have a question that I have not been able to find an answer to after reading the manual and examples and I was hoping someone could help me. So, let's say I have an elastic number of hosts all in rfc-1918 space that need to talk to each other. And lets also say that I do not trust the network they are on. Is there a way I can configure tinc on all N hosts to use the
2011 Jan 09
1
Operating on count lists of non-equal lengths
This is my first post to R-help and I look forward receiving some advice for a novice like me... I?ve got a simple repeated (4 periods so far) 10-question survey data that is very easy to work on Excel. However, I?d like to move the compilation to R but I?m having some trouble operating on count list data in a neat way. The data C > str(C) 'data.frame': 551 obs. of 13
2013 Apr 18
6
count each answer category in each column
Hey, Is it possible that R can calculate each options under each column and return a summary table? Suppose I have a table like this: Gender Age Rate Female 0-10 Good Male 0-10 Good Female 11-20 Bad Male 11-20 Bad Male >20 N/A I want to have a summary table including the information that how many answers in each category, sth like this: X
2010 Dec 10
3
Adding numbers in Outputs
two OutputsHello! I am Amelia from Auckland and work for a bank. I am new to R and I have started my venture with R just a couple of weeks back and this is my first mail to R-forum. I need following assistance Suppose my R code generates following outputs as > X [[1]] [1] 40 [[2]] [1] 80    160 [[3]] [1] 160   80  400 > Y [[1]] [1] 10 [[2]] [1] 10    30 [[3]] [1] 5  18  20
2006 May 08
2
On the speed of apply and alternatives?
Dear all, I have to handle a large matrix (1000 x 10001) where in the last column i have a value that all the preceding values in the same row has to be compared to. I have made the following code : # generate a (1000 x 10001) matrix, testm # generate statistics matrix 1000 x 4: qnt <- c(0.01, 0.05) cmp_fun <- function(x) { LAST <- length(x) smpls <- x[1:(LAST-1)] real
2012 May 02
5
editing bind (DNS) configuration under CentOS 6
Hello listmates, It appears that system-config-bind has been phased out. Whatever the reasoning was behind that decision - what are we expected to do now? Edit it manually? That is doable, of course, but kind of cumbersome. Does anybody know if there is a tool we are expected to use for that purpose? Thanks. Boris.
2012 Nov 07
8
Aggregate data frame across columns
Folks, I have a data frame with columns 200401, 200402, ..., 201207, 201208. These represent years/months. What would be the best way to sum these columns by year? What about by quarter? Thanks for your time, KW -- [[alternative HTML version deleted]]
2011 Sep 03
2
problem in applying function in data subset (with a level) - using plyr or other alternative are also welcome
Dear R experts. I might be missing something obvious. I have been trying to fix this problem for some weeks. Please help. #data ped <- c(rep(1, 4), rep(2, 3), rep(3, 3)) y <- rnorm(10, 8, 2) # variable set 1 M1a <- sample (c(1, 2,3), 10, replace= T) M1b <- sample (c(1, 2,3), 10, replace= T) M1aP1 <- sample (c(1, 2,3), 10, replace= T) M1bP2 <- sample (c(1, 2,3), 10, replace= T)
2006 Mar 19
1
Question on creating a report
Hi, I''ve got a little Rails app, and I wanted to generate a report from some data. I did it one way, but it didn''t seem quite "Rails". I created two methods in a controller, one called "report" that was empty: def report end that would just then display the report.rhtml page. This page contained a form tag with a text box and a submit button. This form
2004 Aug 31
7
blockwise sums
I am looking for a function like my.blockwisesum(vector, n) that computes sums of disjoint subsequences of length n from vector and can work with vector lengths that are not a multiple of n. It should give me for instance my.blockwisesum(1:10, 3) == c(6, 15, 24, 10) Is there a builtin function that can do this? One could do it by coercing the vector into a matrix of width n, and then use
2011 Feb 15
1
matrixStats: Extend to arrays too (Was: Re: Suggestion: Adding quick rowMin and rowMax functions to base package)
Hi. On Sun, Feb 13, 2011 at 10:18 AM, TakeoKatsuki <takeo.katsuki at gmail.com> wrote: > > Hi Henrik, > > It would be nice if functions of the matrixStats package can handle array > data. > For example, rowSums() of the base package sums along the third axis of an > array by rowSums(x, dim=2). That is a good idea. This was indeed the initial objective before starting
2009 Apr 14
2
matrix merge problem
Dear r-help contributors, I have two questions: first: I have a matrix A and a vector B. I want to make a new matrix C, which is made of the rows of A having a value included in B. Second: I have two matrixes A and B, of different dimensions. B has unique values in column 2 and A has not unique values on column 2. I want to merge this two matrixes by the values in the columns 2 of B and 2 of
2009 Sep 10
2
Merge data frames but prefer values in one
Hello everyone, My problem is better explained with an example: > x=data.frame(a=1:4,b=1:4,c=rnorm(4)) > x a b c 1 1 1 -0.8821089 2 2 2 -0.7082583 3 3 3 -0.5948835 4 4 4 -1.8571443 > y=data.frame(a=c(1,3),b=3,c=rnorm(2)) > y a b c 1 1 3 -0.273155973 2 3 3 0.009517862 Now I want to merge x and y by columns a and b, hence creating a data.frame with all
2009 Dec 19
4
expand.grid game
Dear list, In a little numbers game, I've hit a performance snag and I'm not sure how to code this in C. The game is the following: how many 8-digit numbers have the sum of their digits equal to 17? The brute-force answer could be: maxi <- 9 # digits from 0 to 9 N <- 5 # 8 is too large test <- 17 # for example's sake sum(rowSums(do.call(expand.grid, c(list(1:maxi),
2005 Dec 06
3
merging with aggregating
Dear List, I have two data.frame of the following form: A: n V1 V2 1 12 0 2 10 8 3 3 8 4 8 4 6 7 3 7 12 0 8 1 0 9 18 0 10 1 0 13 2 0 B: n V1 V2 1 0 2 2 0 3 3 1 9 4 12 8 5 2 9 6 2 9 8 2 0 10 4 1 11 7 1 12 0 1 Now I want to merge those frame to one data.frame with summing up the columns V1 and V2 but not the column n. So the result
2011 Nov 14
7
Very simple loop
I'm very new to R and am trying to create my first loop. I have: x <-c(0:200) A <- dpois(x,exp(4.5355343)) B <- dpois(x,exp(4.5355343 + 0.0118638)) C <- dpois(x,exp(4.5355343 -0.0234615)) D <- dpois(x,exp(4.5355343 + 0.0316557)) E <- dpois(x,exp(4.5355343 + 0.0004716)) F <- dpois(x,exp(4.5355343 + 0.056437)) G <- dpois(x,exp(4.5355343 + 0.1225822)) and would like to
2011 Sep 04
1
combining rows
First time using R and have so many basic questions. The problem that I have confronted is combining rows. I have a data frame that contains daily rain falls from 60 to 80. There are 27 columns which are Year,month, day, and record in hours. I am trying to combine the 4th column to the 27th to get daily rain fall data. rowSums() works in the case of merging all rows but in my case, I need to
2011 Aug 30
1
"Negative length vector" error in simple merge
Hi, I'm trying to take a vector (length almost 2,000,000) and merge it with a data frame of the same length. I'm trying to do it solely based on index, and not any other factors. The vector is called "offense", and the data frame is just called "data". I went with the simplest option: merge(data,offense) but it always gives me the same error: Error in