similar to: working with tables -- was Re: Mode (statistics) in R?

Displaying 20 results from an estimated 100 matches similar to: "working with tables -- was Re: Mode (statistics) in R?"

2011 Dec 01
1
strange row numbering after rbind-ing a list
"Not that it really matters, but" Can someone explain how the row numbers get assigned in the following sequence? It looks like something funky happens when rbind() coerces 'bar' into a dataframe. In either sequence of rbind below, once you get past the first two rows, the row numbers count normally. Rgames> (foo<-data.frame(x=5,y=4,r=3)) x y r 1 5 4 3 Rgames>
2011 Sep 13
1
stupid lm() question
I feel bad even asking, but: Rgames> data(OrchardSprays) Rgames> model<-lm(decrease~.,data=OrchardSprays) Rgames> model Call: lm(formula = decrease ~ ., data = OrchardSprays) Coefficients: (Intercept) rowpos colpos treatmentB treatmentC 22.705 -2.784 -1.234 3.000 20.625 treatmentD treatmentE treatmentF treatmentG treatmentH
2006 Apr 15
1
Removing Rows/Records from a Table
I would like to selectively remove rows from a table. I had hoped that I could create a table and selectively add rows with something like > NewTable<-table(nrow=100, ncol=4) > NewTable[1,]<-OldTable[10,] but that doesn't work. The former call gives > NewTable ncol nrow 4 100 1 while the latter call gives a table the length of OldTable. Making a matrix, m, with the
2010 Jan 14
2
Fixed size permutations
I'm using functions to return a matrix of all permutations of a specified size from a larger list for predictor selection. For each predictor size I use a seperate function like this: bag2 <- function(n) { rl <- c() for (i1 in seq(n)) { for (i2 in seq(n)) { if (length(unique(c(i1,i2)))==1) {next} rl <- cbind(rl,matrix(c(i1,i2))) } }
2011 Jan 04
1
function masking and gmp questions
Hi, Here's the problem I ran into: the gmp package has a method for apply() so it masks the base::apply function. With gmp installed, I tried to run the function turnpoints() from the pastecs package. It fails because it calls apply() internally, like this: apply(mymatrix,1,max,na.rm=TRUE) , but the code in the gmp package which sets up the operator overload for apply() strictly
2010 Dec 01
3
How to pass selection criteria in a function
Hi, Suppose I have the following data name     score Abel        88 Baker      54 Charlie    77 stored a  table called myData. I want to write a function that will create a table which is a subset of myData containing those have a score > 75. I know I can do this with the following command: subset(myData, score > 75) But I would like to do this via a function, something like:
2006 Oct 22
1
disaggregating table
Hi all, This should be easy, but I can't seem to figure it out. I have a table like this named newtable a1 a2 a3 a4 Cnts Score 1 1 0 0 4 3.28 1 0 1 1 2 2.63 I want the following: a1 a2 a3 a4 Cnts Score 1 1 0 0 4 3.28 1 1 0 0 4 3.28 1 1 0 0 4 3.28 1 1 0 0
2006 Mar 14
2
Multi-line paste function
Here's my contribution to R. When R interacts with external programs (MySQL, cURL, etc.), it often requires a pasted string that is sent to these programs. For readability reasons, it is often preferable to have complex commands (SQL for example) spread on several lines. However, the normal paste function requires to add additional ' ", ' at the end of each line and another '
2005 Aug 22
3
read a table ignoring specific rows ?
Dear R users, First of all sorry for this question, surely quite naive. (I searched on the R site but was unable to find by myself). I have a table, called infile : 1 2 3 4 5 6 7 8 9 I would like to read it and ignore the rows with 1st element > 3 I do it now with a for loop, and it's ok, but I was expecting something simpler, like : intable = read.table(infile); newtable =
2006 Mar 07
7
m:n or multiple 1:n?
I have a Newbee question: i have three tables and want to connect them. so is it stupid to make a triple m:n (rails style xs_ys_zs) or do i have to make a new table (newtable) where i got multiple 1:n? the habtm (has and belongs to many) do only work proper to join two tables, or i am wrong? -jens -- Posted via http://www.ruby-forum.com/.
2010 Apr 25
1
Problem loading MLInterfaces
I have been using R 2.10.1. and Bioconductor but the package "MLIntrefaces" is not being loaded on my platform. the error message Error in loadNamespace(i[[1L]], c(lib.loc, .libPaths())) : there is no package called 'coin' Error in as.environment(pos) : no item called "newtable" on the search list Error: package/namespace load failed for 'MLInterfaces'
2007 Feb 23
1
help with RMySQL
Hi R users, I am using RMySQL to connect to a database in MySQL. I have 3 questions. 1)When I give the following command dbListTables(con) I get the output stack imbalance in .Call, 142 then 143 stack imbalance in <-, 140 then 141 stack imbalance in {, 138 then 139 stack imbalance in standardGeneric, 126 then 127 stack imbalance in class, 121 then 122 stack imbalance in
2011 Nov 18
3
tip: large plots
Hi all, I'm working with a bunch of large graphs, and stumbled across something useful. Probably many of you know this, but I didn't and so others might benefit. Using pch="." speeds up plotting considerably over using symbols. > x <- runif(1000000) > y <- runif(1000000) > system.time(plot(x, y, pch=".")) user system elapsed 1.042 0.030 1.077
2011 Nov 06
1
Deleting rows dataframe in R conditional to “if any of (a specific variable) is equal to”
Dear list, I have been struggling for some time now with this code... I have this vector of unique ID "EID" of length 821 extracted from one of my dataframe (skate). It looks like this: > head(skate$EID) [1] "896-19" "895-8" "899-1" "899-5" "899-8" "895-7" I would like to remove the complete rows in another dataframe
2012 Apr 06
3
filling the matrix row by row in the order from lower to larger elements
Hello, everybody! I have a matrix "input" (see example below) - with all unique entries that are actually unique ranks (i.e., start with 1, no ties). I want to assign a value of 100 to the first row of the column that contains the minimum (i.e., value of 1). Then, I want to assign a value of 100 to the second row of the column that contains the value of 2, etc. The results I am looking
2011 Oct 17
5
Install the rugarch-package
Hi, i am unable to install the rugarch package. More than that i do not even find this package in my list of possible packages. Its possible than the name has changed, or the package is not longer availiable? Is there a similar package avaliable for garch modelling except the fGarch what i am using now? many Thanks Roland -- View this message in context:
2008 Apr 10
3
Zfs send takes 3 days for 1TB?
Can zfs send utilize multiple-streams of data transmission (or some sort of multipleness)? Interesting read for background http://people.planetpostgresql.org/xzilla/index.php?/archives/338-guid.html Note: zfs send takes 3 days for 1TB to another system Regards, Jignesh
2003 Oct 23
1
Can you create a MySQL database with RMySQL?
Is it possible to create a database in MySQL via RMySQL? Also, is the format for the authorization field 'userName/password at databasename'? I saw an example like this somewhere in the documenation, but I haven't found the actual specification. Thanks, Barnet Wagman
2010 Apr 01
2
canary_thread
People, Anybody knows what mean this message in my CLI: [Apr 1 16:58:34] WARNING[3845]: asterisk.c:3050 canary_thread: The canary is no more. He has ceased to be! He's expired and gone to meet his maker! He's a stiff! Bereft of life, he rests in peace. His metabolic processes are now history! He's off the twig! He's kicked the bucket. He's shuffled off his mortal
2006 Sep 14
4
Massive data insert during migration
Hello all, I''ve got a site that will be used by people (hopefully) all over the world. One of the requirements of registration is country and province of residence. I have a list of all the countries in the world and all their subnational entities. Currently, the two lists are divided between a pair of comma-delimited text files. If this were something less dynamic and cool, I''d