similar to: How to best divide table by table

Displaying 20 results from an estimated 300 matches similar to: "How to best divide table by table"

2013 Apr 22
2
subset dataframe
I can't understand what is happening. This is the code and results: > agoa <- read.table(file = "C:/Users/HTPC/Documents/_Documents/Research/WithDidia/AGOAUSImports.txt", header = T, sep = "\t", dec = ".", na.strings = "NA", stringsAsFactors = T)# > str(agoa); names(agoa) 'data.frame':109 obs. of  19 variables:  $ X    : Factor w/ 39
2010 Nov 17
3
stacking consecutive columns
I have a file, each column of which is a separate year, and each row of each column is mean precipitation for that month. Looks like this (except it goes back to 1964). month X2000 X2001 X2002 X2003 X2004 X2005 X2006 X2007 X2008 X2009 1 1.600 1.010 4.320 2.110 0.925 3.275 3.460 0.675 1.315 2.920 2 2.960 3.905 3.230 2.380 2.720 1.880 2.430 1.380
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]]
2009 Jun 12
2
Sweave recode(car) and Lyx, compiling but not executing on Mac
I am just beginning to use Sweave with Lyx on a Mac (R2.8.1). I have 12 chunks of Sweave code that work fine, but this piece: <<>>= library(car)
2008 Feb 13
2
apply on large arrays
I have a big contingency table, approximately of size 60*2*500*500, and I need to count the number of cells containing a count of 1 for each of the factors values defining the first dimension. Here is my attempt: tab1<-with(pisa1,table(CNT,GENDER,ISCOF,ISCOM)) tab2<-apply(tab1,1:4,function(x)ifelse(sum(x)==1,1,0)) tab3<-apply(tab2,1,sum) Computing tab2 is very slow. Is there a faster
2010 Jul 25
1
Left Outer Join 2 DF's on Multiple Conditions
Hi, I am trying to execute the following SQL statement using two data frames: tab1, tab2 : Two Tables Select tab1.*, tab2.*, tab1.tobiiTime - tab2.ruiTime as timeDiff, IFNULL(n-m, -9999999) as alwaysIncrement FROM tab1 LEFT OUTER JOIN tab2 On tab1.data1 - tab2.mouseX = 0 And tab1.data2 - tab2.mouseY = 0 I am trying to do the following in R:- *#Getting error here:* data
2013 Apr 10
6
means in tables
Hi. I have 2 tables, with same dimensions (8000 x 5). Something like: tab1: V1 V2 V3 V4 V5 14.23 1.71 2.43 15.6 127 13.20 1.78 2.14 11.2 100 13.16 2.36 2.67 18.6 101 14.37 1.95 2.50 16.8 113 13.24 2.59 2.87 21.0 118 tab2: V1 V2 V3 V4 V5 1.23 1.1 2.3 1.6 17 1.20 1.8 2.4 1.2 10 1.16 2.6 2.7 1.6 11 1.37 1.5 2.0 1.8 13 1.24 2.9 2.7 2.0 18 I need generate a table of averages, the
2010 Apr 24
2
table command
Hi, Let s be a dataframe. > s A B C 0 0 1 1 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 1 1 0 1 1 0 0 1 > tab1=table(s[,c(1,2)]) > tab1 B A 0 1 0 3 3 1 3 0 > tab2=table(s[,c(1,3)]) > tab2 C A 1 0 6 1 3 The problem is I need to access frequency corresponding to (0,0). tab1[1] will give me the correct value
2009 Dec 22
2
Nested For loops
Dear R experts, Might be very simple question to ask but would be insightful. As the same story of nested "for loops". following is the code that I am using to get the autocorrelation function of the sample data. I have tried to get rid of for loops but since I am touching R after such a long time that I need to practice more but I need help to revive my skills. I know that apply() or
2011 Oct 29
1
Refresh tab content on click in JQuery UI Tabs
HI Guy''s TAB1 and TAB2 have some radio button, checkbox and dropdown menu. When TAB1 is selected, I have to switch to TAB2 and then back to TAB1 to refresh the loaded content. How to make TAB1 refresh loaded content when click on its tab? *code is something like that* <ul class="tabs"> <li><a *href="#tab1"*>Gallery</a></li>
2005 Jun 24
1
comparing strength of association instead of strength of evidence?
Hi, I asked this question before, which was hidden in a bunch of questions. I repharse it here and hope I can get some help this time: I have 2 contingency tables which have the same group variable Y. I want to compare the strength of association between X1/Y and X2/Y. I am not sure if comparing p-values IS the way even though the probability of seeing such "weird" observation under H0
2011 Nov 26
1
data.table merge equivalent for all.x
Een ingesloten tekst met niet-gespecificeerde tekenset is gescrubt ... Naam: niet beschikbaar URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111126/e14d6638/attachment.pl>
2005 Nov 15
1
latex table and R codes
Dear R-help assistance; may you help me regrding to following inquiry!? you know what, i have generated three tables by xtable R function, right now i am trying to make a single table by putting these tables togethere; actully i am going to come upt with *.tex (latex) file. because i have more extera non-R material, i am using Sweave to read R instructions, and finally i hope to end up with a
2007 Jan 27
5
Prototype not processing javascript
I''m trying to change over from Rails 1.1.6 to 1.2.1 and have discovered that either something is wrong with Prototype of else something has changed that I am not aware of and cannot find documentation on. (I just joined this group, so if this has already been cussed and discussed here or in another list then please point me in the right direction.) I am trying to use the
2009 Aug 06
1
calasification table under conditions
hi, i have a file with 49000 lines i want to do a classification in two tables suppose data <- read.csv2("c:/total.csv", sep=",") if the second colonne contains ( A,B,C,D)------------> tab1 if the second colonne contains ( E,F,G,H)------------> tab2 How can do this ? Thank you for your help [[alternative HTML version deleted]]
2003 Aug 27
4
read.spss (package foreign) and character columns
Dear R users! I am using R Version 1.7.1, Windows XP, package "foreign" (Version: 0.6-1), SPSS 11.5.1. There is one thing I noticed with "read.spss", and I'd like to ask if this is considered to be a feature, or possibly a bug: When reading character columns, character strings seem to get filled with blanks at the end. Simple example: In SPSS, create a file with one
2005 Oct 25
2
data.frame-question
Dear R-List, I am very new to R and programming itself, so my question may be easy to answer for you. I tried a lot and read through the manuals, but I still have the following problem: I have 2 data-frames: Number<-as.numeric (Number) Name<-as.character (Name) TAB1<-data.frame (Name,Number) - it looks like this:- Name Number A 2 A 3 A 6 B 8 B 12 B 7 C 8 D 90 E 12 E 45 佲仸
2008 Dec 01
1
How to make a banner table.
I have a dataframe with the following variables: idnum area gender race etc. I would like to make a table that looks like area gender race M F B W A 1 4 5 3 5 1 2 6 7 4 6 3 etc. Basically, I want to make a single broad table with a number of sub-set tables. I have tried: cbind(table(area, gender), table(area, race)) But, when I do this, I lose the labels gender / race. This makes it
2012 Oct 12
2
Problem to read non-standard csv file
Hi all, I have a problem to read csv file with comma as decimal. The numbers were readed as strings. I used the following string in R, but I do not understand why it does not work. tab <- read.csv2("Specimen_RawData_1.csv", header = TRUE, sep = ";", dec = ",", nrows = -1) In addition, I copy/past into the post the link to the csv file generated by my instrument.
2012 Jan 13
1
apply transformation
Hello All, I have the following dataset: Year 2006 2007 Jan Jan 0.0204 0.0065 Feb Feb 0.0145 0.0082 Mar Mar 0.0027 0.0122 > dput(d_tmp) structure(list(Year = c("Jan", "Feb", "Mar"), `2006` = c(0.0204, 0.0145, 0.0027), `2007` = c(0.0065, 0.0082, 0.0122)), .Names = c("Year", "2006", "2007"), row.names = c("Jan",