similar to: splitting and reorganising a data.frame

Displaying 20 results from an estimated 300 matches similar to: "splitting and reorganising a data.frame"

2010 Jan 04
1
log-normal overlay
Hello, Using the following lines of code, I created the following graph:
2010 Jan 04
1
log normal overlay
Hello, Using the following lines of code, I created the following graph:
2008 Mar 23
3
Reorganising general CentOS FAQ
Hi guys, I would like to reorganise the general CentOS FAQ. It now has 20 questions about a lot of different things that can be structure much better. I would like to add some questions, but lacking any structure... I would like to make a distinction between the following subjects: - General questions about the CentOS project Answers about what the project is about, why the project
2007 Dec 03
1
Plotting monthly timeseries with an x-axis in "time format"
I have the following timeseries "tab" ===================================== > str(tab) mts [1:23, 1:2] 79.5 89.1 84.9 75.7 72.8 ... - attr(*, "dimnames")=List of 2 ..$ : NULL ..$ : chr [1:2] "Ipex...I" "Omel...E" - attr(*, "tsp")= num [1:3] 2006 2008 12 - attr(*, "class")= chr [1:2] "mts" "ts" > tab
2012 Dec 31
3
cut ()
Hello List, My goal is to create a 5 category variable (p1_st_data$ob_mrj_cat), based on the p1_st_data$obt_mrj_p variable, using the following code for 50 States and District of Columbia (N=51). p1_st_data$ob_mrj_cat <- cut (p1_st_data$obt_mrj_p, quantile (p1_st_data$obt_mrj_p, (0:5/5), include.lowest=TRUE)) The issue is that, for Utah, I am getting an <NA> instead of (42,48.7] in
2009 Mar 11
2
Question about datatypes/plotting issue
Hi, I am trying to plot the Case-Shiller index found at: http://www2.standardandpoors.com/spf/pdf/index/CSHomePrice_History_022445.xls The way I'm importing it into R is as follows: library(gdata) W <- read.xls("http://www2.standardandpoors.com/spf/pdf/index/CSHomePrice_History_022445.xls ", header=TRUE) attach(W) To give you and idea of what the data looks like: >
2013 Jan 13
1
Extract data in word pad
Dear r-users,   I have saved data in word pad.  I would like to extract certain part of data only, for example   19710629 080000(PARTIAL) 39.3 at interval beginning 19701126 010326 19720629 080000(PARTIAL) 33.8 at interval beginning 19720517 144507 19730629 080000(PARTIAL) 32.2 at interval beginning 19720910 135747   and so on...   The original data set are given below:      
2011 May 18
1
assign $y of predict() function output to variable
Hello R-help Below is the output from the predict() function. How can I assign $y to a variable. >predict(function,df2) $x        V1 1   36.28 2   34.73 3   33.74 4   69.87 5   58.88 6   89.44 7   43.97 8   41.94 9   33.34 10  38.47 11  35.16 12  42.94 13  46.76 14  53.24 15  52.43 16  50.40 17  34.42 18  33.22 19  33.24 20  39.60 21  39.32 22  44.71 23  54.03 24  47.48 25  35.42 26  34.78
2014 Sep 01
1
Correlation Matrix with a Covariate
R Help - I'm trying to run a correlation matrix with a covariate of "age" and will at some point will also want to covary other variables concurrently. I'm using the "psych" package and have tried other methods such as writing a loop to extract semi-partial correlations, but it does not seem to be working. How can I accomplish this? library(psych) > set.cor(y =
2007 Dec 09
1
Setting the grid of a graph of timeseries
I have the following code #################################################################### library(zoo) miedate <- yearmon((2006)+seq(0,23)/12) tab <- zoo(cbind(A = c(79.47, 89.13, 84.86, 75.68, 72.82, 78.87, 93.46, 78.18, 82.46, 77.25, 80.95, 84.39, 81.7, 74.76, 65.29, 60.3, 66.59, 73.19, 92.39, 65.76, 77.45, 74.22, 101.36, 100.01), B = c(77.95, 76.73, 51.2, 51.86, 51.29, 49.45,
2006 Apr 25
1
lme: how to compare random effects in two subsets of data
Dear R-gurus, I have an interpretation problem regarding lme models. I am currently working on dog locomotion, particularly on some variation factors. I try to figure out which limb out of 2 generated more dispersed data. I record a value called Peak, around 20 times for each limb with a record. I repeat the records during a single day, and on several days. I tried to build two models, one
2006 Aug 24
1
how to constrast with factorial experiment
Hello, R users, I have two factors (treat, section) anova design experiment where there are 3 replicates. The objective of the experiment is to test if there is significant difference of yield between top (section 9 to 11) and bottom (section 9 to 11) of the fruit tree under treatment. I found that there are interaction between two factors. I wonder if I can contrast means from levels of
2008 Mar 26
2
Range across a List
Hi R, I have a list > class(pp2) [1] "list" > length(pp2) [1] 1244 It is in the below format RIC Trade.Date Close.Price Currency.Code Convertion.Rate New.Price ABCD.SZ 2008/02/29 15.30 CNY 0.1408 2.154240 ABCD.SZ 2008/01/31 15.27 CNY 0.1392 2.125584 ABCD.SZ 2007/12/31 14.88 CNY 0.1371 2.040048
2005 Jan 03
2
Two brief questions concerning sapply. Can anyone please help?!
To anyone who can help: I have two brief questions concerning sapply. Following below is the code for my example. The two problems are described at the end of the code: site <- rep(2:6, each = 12) tillage <- rep(c(1,-1), each = 6, times = 5) carbon <- c(18.23, 16.06, 17.81, 16.07, 17.26, 17.08, 14.92, 15.88, 12.11, 14.23, 16.99, 13.57, 20.34, 20.3,
2011 Nov 29
2
aggregate syntax for grouped column means
I am calculating the mean of each column grouped by the variable 'id'. I do this using aggregate, data.table, and plyr. My aggregate results do not match the other two, and I am trying to figure out what is incorrect with my syntax. Any suggestions? Thanks. Here is the data. myData <- structure(list(var1 = c(31.59, 32.21, 31.78, 31.34, 31.61, 31.61, 30.59, 30.84, 30.98, 30.79, 30.79,
2004 Aug 21
3
Puzzled at lm() and time-series
I tried toy problems and there doesn't seem to be a basic problem between lm() and ts objects: X = data.frame(x=c(1,2,7,9), y=c(7,2,3,1)) lm(y ~ x, X) X <- lapply(X, function(x) ts(x, frequency=12, start=c(1994,7))) lm(y ~ x, X) and this works fine - whether you do an lm() before or after making ts objects, it's okay. But I have a situation where things aren't okay.
2001 Sep 12
6
Yet another backtrace
Another one at block.c:176: --- Title: We The People Artist: DJ Lithium Presents Bitstream is 2 channel, 44100Hz Time: 58:29.07, Bitrate: 100.1 Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1024 (LWP 27207)] _vds_shared_init (v=0xbffff73c, vi=0x4024efe0, encp=0) at block.c:176 176 b->modebits=ilog2(ci->modes); (gdb) bt #0 _vds_shared_init
2009 Nov 03
2
reshaping pairs of columns
Given a data frame consisting of a pointID and 12 pairs of (lat, long) variables, with names latA, longA, latB, longB, ... latL, longL, I want to reshape it into a data frame with the structure point source lat long 1 A ... ... 1 B ... ... I've looked at reshape and plyr, but can't figure out how to do this. Details of my data frame are below
2012 Oct 17
3
aggregate function not working?
The aggregate function for some reason will now work for me. The error I'm getting is: "Error in sort.list(y) : 'x' must be atomic for 'sort.list' Have you called 'sort' on a list?" agPriceList=aggregate(PriceList$Size, list(PriceList$bandNum),sum) *Price list dataframe:* dput(PriceList) structure(list(Price = c(0, 8.18, 8.27, 10.42, 10.5, 10.6, 11.13,
2009 Jan 25
1
[LLVMdev] gfortran benchmarks
Since the fact that gfortran performance has improved over the major releases, I decided to benchmark the current releases on a MacPro with the Polyhedron 2005 benchmarks using -ffast-math -funroll-loops -msse3 -O3. The results are... gcc release gcc 4.2.4 gcc 4.3.3 gcc 4.4-pre gcc 4.3.3/ gcc 4.4-pre/