search for: b77s

Displaying 15 results from an estimated 15 matches for "b77s".

Did you mean: b77
2011 Dec 02
2
Moving column averaging
# need zoo to use rollapply() # your data (I called df) df <- structure(list(a = 1:2, b = 2:3, c = c(5L, 9L), d = c(9L, 6L), e = c(1L, 5L), f = c(4, 7)), .Names = c("a", "b", "c", "d", "e", "f"), class = "data.frame", row.names = c(NA, -2L)) # transpose and make a zoo object df2 <- zoo(t(df)) #rollapply to get
2011 Jul 06
3
identifying a 'run' in a vector
Hi, How can I discern which elements in x (see below) are in 'order', but more specifically.. only the 1st 'ordered run'? I would like for it to return elements 1:8... there may be ordered values after 1:8, but those are not of interest. x <- c(1, 2, 3, 4, 5, 6, 7, 8, 20, 21, 22, 45) Thanks for any suggestions. -- View this message in context:
2011 Apr 16
3
if else statements in data frame
Dear R experts, I have again a problem. Let I have a data frame like below: x y ---------- A A A B B B A B where x and y are the column names. I want to create a new column z where it is elements will be like that, if at each row has there at least one 'B', then z will have value of B, if not then Z will have missing value(NA) for the corresponding row. So my result data frame should be
2011 Nov 17
1
split list of characters in groups of 2
hi, If i have a list of things, like this var.names <- c("a", "b", "c", "d", "e", "f") how can i get this: "a, b", "c, d", "e, f" thanks ahead of time. -- View this message in context: http://r.789695.n4.nabble.com/split-list-of-characters-in-groups-of-2-tp4079031p4079031.html Sent from the R
2012 Jan 23
1
R not giving significance tests for coefficients/estimates?
> 3x4 Error: unexpected symbol in "3x4" R has no idea that you equate "x" as multiplication.. use an astrix > 3*4 [1] 12 dominic wrote > > This is basically my code: > > library(MASS) > lmsreg(formula = b0 ~ b1 + b3 + b1xb2, data=mydata) > > b1xb2 is an interaction but it was the centered value for a continuous > variable times a
2011 Feb 14
4
R, Ubuntu, package installation with non-zero exit status
All: I have been looking through the string of posts regarding this same issue, but I haven't been able to fix this problem. I am running Ubuntu 10.4 64bit, R version 2.10.1 I cannot install certain packages (e.g. "vegetarian") and each time it says basically the same thing (regardless of the package): ################################################################ ... leaving
2011 Feb 06
2
Subsampling out of site*abundance matrix
Hello, How can I randomly sample individuals within a sites from a site (row) X species abundance (column) data frame or matrix? As an example, the matrix "abund2" made below. ##### (sorry, Im a newbie and this is the only way I know to get an example on here) abund1 <- c(150, 300, 0, 360, 150, 300, 0, 240, 150, 0, 60, 0, 150, 0, 540, 0, 0, 300, 0, 240, 300, 300,
2011 Apr 08
5
duplicates() function
I need a function which is similar to duplicated(), but instead of returning TRUE/FALSE, returns indices of which element was duplicated. That is, > x <- c(9,7,9,3,7) > duplicated(x) [1] FALSE FALSE TRUE FALSE TRUE > duplicates(x) [1] NA NA 1 NA 2 (so that I know that element 3 is a duplicate of element 1, and element 5 is a duplicate of element 2, whereas the others were
2011 Sep 07
1
reshaping data
I have the following data (see RawData using dput below) How do I get it in the following 3 column format (CO2 measurements are the elements of the original data frame). I'm sure the package reshape is where I should look, but I haven't figured out how. Thanks ahead of time Month Year CO2 J 1958 F 1958 M 1958 315.71 A 1958 317.45 M.1 1958 317.5 J.1 1958 J.2 1958 315.86 A.1 1958
2011 Jul 12
1
installation of package 'mapproj' had non-zero exit status
## Hello.. I have asked a similar question, but this is not fixed as before. ## I am running the following using Ubuntu OS: R version 2.13.1 (2011-07-08) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-pc-linux-gnu (64-bit) ## when I do this: > install.packages("mapproj", dependencies=T) ## I get this: Installing package(s)
2011 Nov 09
4
Interpreting Multiple Linear Regression Summary
I would appreciate pointers on what I should read to understand this output: summary(lm(TDS ~ Cond + Ca + Cl + Mg + Na + SO4)) Call: lm(formula = TDS ~ Cond + Ca + Cl + Mg + Na + SO4) Residuals: ALL 1 residuals are 0: no residual degrees of freedom! Coefficients: (6 not defined because of singularities) Estimate Std. Error t value Pr(>|t|) (Intercept) 125 NA
2011 Nov 24
4
I cannot get species scores to plot with site scores in MDS when I use a distance matrix as input. Problems with NA's?
Hi, First I should note I am relatively new to R so I would appreciate answers that take this into account. I am trying to perform an MDS ordination using the function ?metaMDS? of the ?vegan? package. I want to ordinate species according to a set of functional traits. ?Species? here refers to ?sites? in traditional vegetation analyses while ?traits? here correspond to ?species? in such
2011 Apr 08
0
How to create a 3d Surface plot from a CSV file?
step # 1 ?read.csv -- View this message in context: http://r.789695.n4.nabble.com/How-to-create-a-3d-Surface-plot-from-a-CSV-file-tp3437463p3437478.html Sent from the R help mailing list archive at Nabble.com.
2011 May 18
0
scatter plot: multiple Y variables and error bars
#Hi all, #Using the example data that follows, can someone please show me how to get a scatterplot of points with #error bars in the Y direction. something like this works for one Y: xYplot(Cbind(y1, l1, u1) ~x1, data=y) #but this: xYplot(Cbind(y1, l1, u1) + Cbind(y2, l2, u2)~x1, data=y) # doesn't give me what I would have expected, which is both sets of points to have their respective
2011 Nov 01
1
Subsampling-oversampling from a data frame
If no one has a better solution, split it, take a sample of size X from both and put it back together. hgwelec wrote: > > Dear members, > > Consider the following data frame (first 4 rows shown) > > > age sex class > 15 m low > 20 f high > 15 f low > 10 m low > > in my original data set i have 1200 rows and a class distribution