similar to: need of elegant data manipulation

Displaying 20 results from an estimated 600 matches similar to: "need of elegant data manipulation"

2010 Sep 14
1
NA confusion (length question)
Hi folks, I am running a very simple regression using mylm <- lm(mass ~ tarsus, na.action=na.exclude) I would like the use the residuals from this analysis for more regression but I'm running into a snag when I try cbind(mylm$residuals, mydata) # where my data is the original data set The error tells me that it cannot use cbind because the length of mylm$residuals is
2006 Jul 02
2
how to recode in my dataset?
Dear Rusers, My question is about "recode variables". First, i'd like to say something about the idea of recoding: My dataset have three variables:type,soiltem and airtem,which means grass type, soil temperature and air temperature. As we all known, the change of air temperature is greater than soil temperature,so the values in those two different temperaturemay represent different
2010 Apr 16
2
managing data and removing lines
Hi, I am very new to R and I've been trying to work through the R book to gain a better idea of the code (which is also completely new to me). Initially I imputed my data from a text file and that seemed to work ok, but I'm trying to examine linear relationships between gdist and gair, gdist and gsub, m6dist and m6air, etc. This didn't work and I think it might have something to do
2009 Jan 26
1
reshape problem: id and variable names not being recognized
Hi everyone. Long time listener, first-time caller here. I have a data set that's been melted with the excellent reshape package, but I can't seem to cast it the way I need to. Here's the melted data's structure: > str(mdat) 'data.frame': 6978 obs. of 4 variables: $ VehType : Factor w/ 2 levels "Car","Truck": 1 1 2 1 1 2 1 1 1 1 ... $ Year :
2009 Sep 14
1
ggplot2 graphing multiple lines of data
Some day I may figure out how ggplot2 works. I am trying to plot 5 columns of data on a graph (similar to a simple matplot) =========================================================================== library(ggplot2) bmi <- structure(list(pct = 2:21, P10 = c(14.6, 14.5, 14.2, 13.9, 13.7, 13.7, 13.9, 14.2, 14.5, 14.8, 15.3, 15.9, 16.6, 17.2, 17.8, 18.1, 18.3, 18.4, 18.5, 18.6), P25 =
2003 Jul 15
7
Excel can do what R can't?????
Hi there I thought this would be of particular interest to people using 'optim' functions and perhaps people involved with R development. I've been beaten down by R trying to get it to perform an optimization on a mass-balance model. I've written the same program in excel, and using the 'solver' function, it comes up with an answer for my variables (p, ACT, which
2003 Feb 04
5
SORTING Arrays by index value
Hello, I'm somewhat new to R. I've searched the archive for the last year and tried to consult the manual pages for the following problem, but did not find an answer. I want to sort an array by the index values. Here is the array >acc.gp.bl.wtmn Gp17 Gp4 1 0.5703125 0.6406250 10 0.7812500 0.7109375 11 0.8046875 0.7343750 12 0.8359375 0.7890625 13 0.8515625 0.7109375
2009 Aug 18
1
ggplot2: geom_smooth and legend
Hi all, Is that possible to remove the grey colour in the legend key that goes with the geom_smooth? In my case it doesn't ease the reading of the legend. http://www.4shared.com/file/125864977/e10644f8/desorb.html Cordialement / Regards ------------------------------------------- Benoit Boulinguiez Ecole de Chimie de Rennes (ENSCR) Bureau 1.20 Equipe CIP UMR CNRS 6226 "Sciences
2015 May 14
3
comportamiento de data.table al hacer calculos por grupos
Estimada comunidad tengo un problema del que no encuentro datos que me ayuden mucho en la web. Estoy haciendo calculos por grupos con data,table. Tengo un archivo (zp.res) con tres columnas que clasifican los datos (sol, con, dia) y una columna de datos numericos (media), de la siguiente forma: sol con dia media 1: con 0 1 -22.6 2: con 0 1 -36.6 3: con 0 1 -35.6 y
2007 Feb 19
1
need help in reading TOMS observed ASCII data file
Hello R Users, I am new to R. I have two data sets i) TOMS aerosol optical depth(AOD) and ii) TOMS ozone(O3). > > AOD data is on 1x1 grid and O3 data is on 5x5 grid. > > First I want to read AOD and O3 as it is and then I want to regrid AOD on > 5x5 grid as O3. > > Reading is first problem. > > FIRST PROBLEM READING AOD: > > AOD data is in following format: >
2009 Jan 13
12
OpenSolaris better Than Solaris10u6 with requards to ARECA Raid Card
Under Solaris 10 u6 , No matter how I configured my ARECA 1261ML Raid card I got errors on all drives that result from SCSI timeout errors. yoda:~ # tail -f /var/adm/messages Jan 9 11:03:47 yoda.asc.edu scsi: [ID 107833 kern.notice] Requested Block: 239683776 Error Block: 239683776 Jan 9 11:03:47 yoda.asc.edu scsi: [ID 107833 kern.notice] Vendor: Seagate
2010 Sep 30
7
how to make list() return a list of *named* elements
If I combine elements into a list b <- c(22.4, 12.2, 10.9, 8.5, 9.2) my.c <- sample.int(round(2*mean(b)), 5) my.list <- list(b, my.c) the names of the elements seems to get lost in the process: > str(my.list) List of 2 $ : num [1:5] 22.4 12.2 10.9 8.5 9.2 $ : int [1:5] 11 8 6 9 20 If I explicitly name the elements at list-creation, I get what I want: my.list <- list(b=b,
2008 Jun 23
1
ggplot2-barplot
Hi all: I have been using ggplot2 graphics for quite some time now and I really like it. However, I haven't used barplots enough to understand the arquitecture behind it. Can someone show me how to make this simple barplot graph with ggplot2? I want "PondName" along the x axis and "avgWt" along the Y axis which represents the avgWt by each Pond. PondName avgWt Pond01 21.5
2007 Nov 28
6
How to create data frame from data with unequal length
Hi, I have two sets of data that I would like to put into a data frame. But since they have different length, I am not sure how to do this. Here is an example of my data: data set one: date growth 1/1/2007 10 1/2/2007 10.2 1/3/2007 10.4 1/4/2007 10.6 data set two: date growth 1/1/2007 22 1/2/2007 22.5 1/4/2007 22.4 I would like to combine the two data sets and
2012 Nov 17
1
[HCL] Aviem Power RT 1000-3000VA supported by blazer_ser
Manufacturer: Aviem Power RT 1000-3000VA Description: Rack/Tower Intelligent Online LCD UPS. connected with serial cable. #upsc battery.voltage: 24.96 battery.voltage.low: 21.5 battery.voltage.nominal: 24.0 beeper.status: enabled device.mfr: device.model: device.type: ups driver.name: blazer_ser driver.parameter.pollinterval: 2 driver.parameter.port: /dev/ttyUSB1 driver.version: 2.6.3
2008 Nov 13
2
2^2 problem revisited
Dear R gurus: Here is the following from Montgomery's Design and Analysis of Experiments, 5th edition. > str(rout1.df) 'data.frame': 16 obs. of 3 variables: $ resp: num 18.2 18.9 12.9 14.4 27.2 24 22.4 22.5 15.9 14.5 ... $ A : Factor w/ 2 levels "-1","1": 1 1 1 1 2 2 2 2 1 1 ... $ B : Factor w/ 2 levels "-1","1": 1 1 1 1 1 1 1 1 2
2007 Feb 06
2
How to do "moran's I test"?
I want to do "moran's I test" in R language. I try to use "gearymoran" in Package "ade4","moran" in Package "spdep", and Moran.I in Package "ape". But I do not know how to do it because data format is different. My data: x y dbh 111.03 10.7 7 118.11 0.28 1.2 165.36 0.36 8.4
2011 May 20
1
Factors to Columns
> str(data) 'data.frame': 250 obs. of 3 variables: $ student: chr "A" "B" "C" "D" ... $ data : num 20.2 20.4 22.5 22.1 23.3 ... $ param : Factor w/ 4 levels "AGE","SCHOOL",..: 1 1 1 1 1 1 1 1 1 1 Hi , i would like to split the dataframe so that each level of param is a column At the end it should look like
2008 Jul 18
2
column wise paste of data.frames
Hi everybody! I'm sure that I overlook something and feel quite stupid to ask, but I have not found an easy solution to the following problem: Take e.g. the Orthodont data from the nlme package: > head(Orthodont) Grouped Data: distance ~ age | Subject distance age Subject Sex 1 26.0 8 M01 Male 2 25.0 10 M01 Male 3 29.0 12 M01 Male 4 31.0 14 M01 Male
2006 Oct 04
1
strip function
Hi, I would like to asign titles into strip of a panel of curves designed thanks to a xyplot function (lattice package) I ve tried the "strip" function, ... here is my code I would like to write in the strip of each panel conditionning varialbe (here, it is data[,1]) xyplot (data[,3] ~ data[,2] | data[,1] , strip.default (which.given=1, which.panel = c(1:15), var.name= c