similar to: Strange behavior using subset

Displaying 20 results from an estimated 1000 matches similar to: "Strange behavior using subset"

2007 Jul 08
1
generating a data frame with a subset from another data frame
R gurus, I have a data set that looks something like this: Site Species DBH #Vines G PLOC 45.9 4 G ACNE 23.3 1 G ACNE 12.0 0 G FRAM 35.9 5 G AEGL 11.2 2 N PLOC 77.3 12 N JUNI 78.6 7 N ACNE 18.9 1 N ACNE 15.7 3 N ACRU 35.5 4 H ACSA2 24.1 6 H ULAM 35.2 7 There are 730 individual trees (22 species) from four sites in the actual data set. I would like to create a second data frame that
2007 Jul 31
2
choosing between Poisson regression models: no interactions vs. interactions
R gurus, I'm working on data analysis for a small project. My response variable is total vines per tree (median = 0, mean = 1.65, min = 0, max = 24). My predictors are two categorical variables (four sites and four species) and one continuous (tree diameter at breast height (DBH)). The main question I'm attempting to answer is whether or not the species identity of a tree has
2007 Aug 13
2
Error message when using zero-inflated count regression model in package zicounts
I have data on number of vines per tree for ~550 trees. Over half of the trees did not have any vines and the data is fairly skewed (median = 0, mean = 1.158, 3rd qu. = 1.000). I am attempting to investigate whether plot location (four sites), species (I'm using only the four most common species), or tree dbh has a significant influence on the number of vines per tree. When I
2007 Jun 12
4
Generating artificial datasets with a specific correlation coefficient.
I need to create artificial datasets with specific correlation coefficients (i.e. a dataset that returns r = 0.30, etc.) as examples for a lab I am teaching this summer. Is there a way to do that in R? Thanks. Jim Milks Graduate Student Environmental Sciences Ph.D. Program 136 Biological Sciences Wright State University 3640 Colonel Glenn Hwy Dayton, OH 45435 [[alternative HTML version
2005 Feb 11
3
Saving graphs in formats other than PDF?
I am running R 2.01 on Mac OS 10.3.7. Whenever I save graphs, they are saved as PDF files. Are there any other file formats to which I could save my graphs. I would like to directly export my graphs to MS Word, if possible. Thank you in advance. Sincerely, Jim Milks Graduate Student Environmental Sciences Ph.D. Program Wright State University 3640 Colonel Glenn Hwy Dayton, OH 45435
2005 May 31
2
plane3d
I am attempting to fit a logistic regression plane to a 3-D scatterplot (which was generated using scatterplot3d). I've noticed that the help pages of scatterplot3d include a function titled "plane3d." However, when I attempt to use the function, I get the following message: Error: couldn't find function "plane3d" I've searched the archives and found no
2005 Apr 18
1
Forcing best-fit lines to go through the origin
Dear All, I have a rather unusual problem. I have a set of data for a class in subsurface processes. From that dataset, I must calculate the slope of the best-fit line (which is the parameter of interest). The problem I have is twofold: 1) for the purposes of the exercise, I must force my best-fit line to go through the origin (0,0), and 2) the line must be linear, even though the data is
2007 Jul 02
4
Extracting sums for individual factors in data frames
I have a data frame with two columns, one of which is a factor (Species) and the other is numeric (BA, which stands for basal area). Here's a sample: Species BA ACSA 55.7632696 FRAM 122.9933524 ACSA 67.54424205 ACSA 89.22123136 ACSA 82.46680716 ACSA 22.46238747 ACSA 19.94911335 ACSA 20.42035225 ACSA 19.00663555 ACSA 21.67698931 ACSA 57.80530483 ACSA 30.31636911 Dead 43.98229715 Dead
2005 May 01
1
Partial F-test comparing full and reduced regression models
Dear all: I have a regression model that has collinearity problems (between three regressor variables). I need a F-test that will allow me to compare between full (with all variables) and partial models (minus 1=< variables). The general F-test formula I'm using is: F = {[SS(full model) - SS(reduced model)] / (#variables taken out)} / MSS(full model) Unfortunately, the ANOVA table
2006 Mar 24
0
Adding gs line to Renviron file on Mac
First the technical details: I'm running Mac OS 10.4.5, R 2.2.0, and just downloaded Ghostscript 8.50 to my Applications folder. My problem is this: after adding ## Ghostscript R_GSCMD=${RGSCMD='/usr/bin/gs'} to my Renviron file, as suggested in several posts on this problem contained in the archives, I still get Error in bitmap("acaldi.bmp", res = 100) : sorry,
2006 Apr 10
0
fdim questions
R-users: My problem: the package fdim (which measures fractal dimensions of datasets) apparently prefers 3-D (XYZ) datasets. I'm trying to measure the information dimension (a type of fractal dimension) of a 2-D (XY) dataset. Here's some examples of the preferred 3-D data (XYZ): library(fdim) XYZ <- (makehplane(NumN=300, DimM=3, Longit=300)) fdim(XYZ,q=0.999999,PlotF=TRUE)
2010 Jan 07
1
LD50 and SE in GLMM (lmer)
Hi All! I am desperately needing some help figuring out how to calculate LD50 with a GLMM (probit link) or, more importantly, the standard error of the LD50. I conducted a cold temperature experiment and am trying to assess after how long 50% of the insects had died (I had 3 different instars (non significant fixed effect) and several different blocks (I did 4 replicates at a time)=
2008 Aug 28
3
Upgrading R means I lose my packages
The title says it all. Does anyone know of a way to save your packages when you upgrade to a new version of R? This may seem petty, but I'm accumulating enough packages that having to download and install each of them anew every time I install a new version of R is rather of a pain. Ideally, I would like the new version of R to recognize the packages I've installed on the
2011 Feb 17
1
cv.glmnet errors
Hi, I am trying to do multinomial regression using the glmnet package, but the following gives me an error (for no reason apparent to me): library(glmnet) cv.glmnet(x=matrix(c(1,2,3,4,5,6,1,2,3,4,5,6), nrow=6),y=as.factor(c(1,2,1,2,3,3)),family='multinomial',alpha=0.5, nfolds=2) The error i get is: Error in if (outlist$msg != "Unknown error") return(outlist) : argument is of
2006 Sep 12
1
Using XY location data to calculate ecological parameters
Dear R gurus, I have XY data giving the locations of tree seedlings that were surveyed during a 210 meter belt transect. This belt transect was taken by stretching a line across the field, then measuring all seedlings within 1 meter on either side of the line. The end result was XY coordinates and height for ~1,300 seedlings. I would like to use that data to calculate density of
2005 Mar 09
1
Aid with 3-D scatterplots
I am attempting to classify pixels from a Landsat image by using their associated numbers in bands 2, 3, and 4 (It's from an assignment on classification). To aid me, I want to create a 3-D scatterplot using the "cloud" command. Due to my ignorance of the finer plotting functions, I am unable to display the scale on the three axes or to display the grid. My dataframe (RS)
2007 Apr 01
3
Doing partial-f test for stepwise regression
Hello all, I am trying to figure out an optimal linear model by using stepwise regression which requires partial f-test, I did some Googling on the Internet and realised that someone seemed to ask the question before: Jim Milks <jrclmilks at joimail.com> writes: > Dear all: > > I have a regression model that has collinearity problems (between > three regressor variables). I
2011 Oct 27
1
Question about .Fortran in glmnet package
Hi, My apologies for asking this question, but could not find the answer elsewhere. I understand the glmnet package uses Fortran code. For example, the lognet.R file includes the lines of code shown below. But how can I see the Fortran code that is being referenced in the code below? Is that provided somewhere in the package source code? .Fortran("lognet",
2009 Feb 24
0
[SoC09-Idea] Movement Ecology add-ons for adehabitat package
Hi all, here's a proposal for a SoC project on wildlife movement patterns analysis. A MSc student is available to anwser the call, of course. The idea has already been briefly discussed with the mantainer of the adehabitat package and the AniMov project community. Short description Develop some add-on functions to use the adehabitat package to perform basic movement ecology analysis, in
2009 Apr 07
1
R segfaulting with glmnet on some data, not other
Hello R-help list, I have a piece of code written by a grad student here at BU which will segfault when using one data set, but complete just fine using another. Both sets are just text files full of real numbers. It seems like a bug within R. It could be a bug within her data, but again, her data is just a bunch of floats, so her data could be triggering a bug within R. I have tried this