similar to: sub setting data.frame

Displaying 20 results from an estimated 200 matches similar to: "sub setting data.frame"

2011 Mar 18
4
subset data frame with condition
Hello, One more question.. I have the data.frame "pop": xloc yloc gonad ind Ene W Area 1 23 20 516.74 1 0.02 20.21 1 2 23 20 1143.20 1 0.02 20.21 1 3 23 20 250.00 1 0.02 20.21 1 4 22 15 251.98 1 0.02 18.69 2 5 22 15 598.08 1 0.02 18.69 2 6 21 19 250.00 1 0.02 20.21 3 7 22 20 251.98 1
2011 Mar 19
3
create a matrix with values from data.frame
Hello, I'm trying to create a matrix (95x55) with data from a data.frame pop: xloc yloc go ind Ene totW 1 23 20 516 1 0.02 20.21 2 23 20 1143 1 0.02 20.21 3 23 20 250 1 0.02 20.21 4 22 15 251 1 0.02 18.69 5 22 15 598 1 0.02 18.69 6 21 19 250 1 0.02 20.21 7 22 20 251 1
2012 Jan 11
1
R CMD check pkg and 32/64 bit.
R gurus: I'm trying to get another round of rconifers out and I need some advice/help crushing differences in the examples test. I'm trying to make sure the max sdi values are being respected. I've added a tests/rconifers-Ex.Rout.save (from windows i386-pc-mingw32) and when I ran R CMD check (both R-2.13.0), I got the following results: * using log directory
2010 Nov 07
2
mean on a plot
Hi, i need to draw a plot with means of values, reading a table from datafile. Example of datafile: Days Weight 0 178.00 0 250.00 0 242.00 0 239.00 0 223.00 0 188.00 0 237.00 0 212.00 0 273.00 0 191.00 0 173.00 0 233.00 0 227.00 0 253.00 0 232.00 4 177.00 4 249.00 4 241.00 4 238.00 4 222.00 4 188.00 4 236.00 4 211.00 4 272.00 4 190.00 4 172.00 4 232.00 4 226.00 4 252.00 4 231.00 if i use
2003 Dec 11
4
Probelm with read.table
Hi All, I have the following text file (mytextfile.txt) 738307 527178 714456 557955 #N/A 17.42 6.22 4.73 #N/A 17.3 6.23 4.75 #N/A 17.29 6.17 4.7 #N/A 17.07 6.12 4.6 #N/A 17.27 6.19 4.7 #N/A 17.72 6.4 4.78 #N/A 17.12 6.19 4.75 #N/A 17.07 6.15 4.65 #N/A 17.03 6.07 4.64 #N/A 17.38 6.13 4.7 #N/A 17.38 6.13 4.7 #N/A 17.38 6.13 4.7 #N/A 17.38 6.13 4.7 #N/A
2011 Feb 25
1
data.frame operations
Hi All, I've been doing circles with this all morning, although I'm sure there's a simple solution. I have a data.frame "pop" as follows: > pop ind xloc yloc gonad 1 1 5 2 12 2 1 5 4 25 3 1 3 3 30 4 1 5 4 10 5 1 1 4 08 . . . . . 10 1 1 4 11 And I need the following steps: 1. Sum
2009 Dec 10
1
barplot and cumulative curve using ggplot2 layers
Hello My dataset is as follows: jobno recruits 1100 18 1200 1 1850 5 2100 190 2789 25 3000 1 . . . . the dataset has 130 rows I want to plot barplot from left side and cumulative curve from right side in one graph itself using layers in ggplot2. I sorted the recruits 1st in decreasing order
2011 Feb 08
2
delete a row in dataframe w/o changing indexing
Hi All, I'm trying to delete a row from my dataframe "pop" without changing the indexing (column 0) as follows: >pop id birth size xloc yloc weight energy gonad consumed 1 1 36 13 34 43 0 18 0 0 2 2 36 10 39 38 0 18 0 0 3 3 36 10 37 35 0 18 0 0 4 4 36 10 31 25 0
2011 Feb 27
2
substract 2 data.frames
Hi! I have 2 data.frames: "fish" and "popn": >fish xloc yloc id birth size weight energy gonad 20 15 15 54 -60 107.9 63.0 15952.9 8.0 21 15 15 32 -60 105.1 61.4 15538.8 7.8 91 4 43 96 -60 118.9 69.4 17573.2 8.8 71 32 4 64 -60 121.6 71.0 17976.0 9.0 34 2 64 20 -60 116.2 67.9 17173.0 8.6 95 6 20 58 -60 106.5
2013 Apr 23
1
lmer with only random effect
Dear all, I want to fit a random effect model with only one random factor. I do not want to include the intercept term either. The model I using now is lmer(values ~ (1|lot), data=tmp) The results are as below. How do I take out the intercept term? Or if this is not possible for the lmer function, is it possible using lme function in the "nlme" package? Thank you very much in
2013 Apr 22
7
Multiple lon lat points in the map with ggplot2
Hello R users, For the last few days I am struggling with the following task: my data.frame: A1 A2 A3 B1 B2 B3 58.81 53.292 54.501 13.013 17.39 19.407 56.02 56.251 54.033 20.099 13.15 10.411 55.376 53.099 57.625 13.396 21.031 13.22 58.584 53.194 54.218 13.038 16.854 19.289 55.7 55.921 53.847 19.942 13.153 9.828 55.093 52.934
2011 Jul 30
1
offline root lvm resize
So here goes... First some back story -Centos 5 with latest updates as of yesterday. kernel is 2.6.18-238.19.1.el5 -setup is raid 1 for /boot and lvm over raid6 for everything else - The / partition (lvm "RootVol") had run out of room... (100% full, things where falling appart...) I resized the root volume (from 20GiB to 50GiB). This was done from a fedora 15 livecd,
2014 Dec 22
1
yum upgrade not working
This often helps to avoid broken dependencies: yum --disablerepo=\* --enablerepo=base --enablerepo=updates update After that, a regular yum update. - Jussi On 22.12.2014 17.39, Tim Dunphy wrote: > Removing that libyaml package allowed me to upgrade! > > Thanks for the tip!
2008 Oct 22
1
convert into numeric variable
Hi, I have an accounting data with "%" at the end and "()" for negative. E.g. if I read in with read.table, then R reads in as a factor: [11625] 4.61% ( 4.11%) 29.85% ( 1.27%) 16.04% 21.31% 14.09% 39.71% [11633] 3.03% 17.39% 80.13% 6648 Levels: ( 0.00%) ( 0.03%) ( 0.04%) ( 0.05%) ( 0.06%) ( 0.07%) ... 99.70% And I was wondering how to convert this column into
2005 Nov 17
1
Problem with fitdistr for gamma in R 2.2.0
Dear R developers, I have encountered strange behaviour of fitdistr for gamma in recent R build i.e. 2.2.0. I have attached the code for data at the end of this mail so you can reproduce the problem. In short, I am able to run fitdistr under 2.1.0 without problems, while I get the following error under 2.2.0 (Version 2.2.0 Patched (2005-11-15 r36348)) > fitdistr(otm, "gamma") Error
2011 Oct 09
3
ANOVA from imported data has only 1 degree of freedom
Hi, I'm trying to analyse some data I have imported into R from a .csv file but when I carry out the aov command the results show only one degree of freedom when there should be 14. Does anyone know why? I'd really appreciate some help, the data is pasted below. /The imported table looks ike this this:/ Order Transect Sample Abundance 1 Coleoptera 1 1 13 2
2010 May 09
1
Plot polygon in 3D with rgl
Dear R-helpers, an rgl-ers in particular, what is the easiest way to plot a section of a plane in 3D, that is given by the xyz coordinates of the outline? Suppose I have a polygon - which I know for sure is a set of coordinates on the same plane. One method I found is to use surf.tri from the geometry package, and then plot the triangles with rgl.triangles. This method is not perfect though,
2010 Sep 20
1
[LLVMdev] Polyhedron 2005 regressions
Comparing the Polyhedron 2005 benchmark results for gfortran from llvm-gcc-4.2 of April 7th, 2010 and September 18th, 2010 (from the rc2 2.8 release branch), we seem to be regressing in performance for this release.... ================================================================================ Date & Time : 7 Apr 2010 22:24:16 Test Name : llvm_gfortran_lin_p4 Compile Command :
2009 Apr 27
1
Extract one element from yahooKeystats data
I am trying to extract one particular piece of data(Float) from all the data returned by yahooKeystats, but thus far I'm having no luck. This is what I've got so far: > library(fImport) Loading required package: timeSeries Loading required package: timeDate > data<-yahooKeystats("IBM") trying URL 'http://finance.yahoo.com/q/ks?s=IBM' Content type 'text/html;
2002 Dec 19
2
list to data.frame
R Help- I have a list of 102 vectors all of the same type and length called time.by.orig. I can't data.frame(time.by.orig) but I can data.frame(time.by.orig[1:length(time.by.orig)]). Why is this? Thanks for your help. str(time.by.orig) List of 102 $ 1 : num [1:102] 1.34 17.39 14.36 14.22 7.56 ... $ 2 : num [1:102] 17.5 0.7 17.7 12.4 10.4 ... $ 3 : num [1:102] 14.063 17.568