similar to: replacement has length zero

Displaying 20 results from an estimated 1000 matches similar to: "replacement has length zero"

2012 Oct 26
1
Openbugs- Array Index
Hi, I'm working on the codes below however every time I run them when they get to OpenBUGS I keep getting the error message: array index is greater than array upper bound for hab. Any help would be greatly appreciated, Suzie Codes: ungulate <- read.csv(file.choose ()) #ungulate ungulate <- as.matrix(ungulate);colnames(ungulate)<-NULL;rownames(ungulate)<-NULL
2012 Jul 13
3
Help with R2 OpenBUGs
Hi, I'm currently working on the below codes however whenever I run it in openbugs it gives an error message saying: unknown type of logical function error pos 76. Any help would be appreciated. ## bugs code library(R2OpenBUGS) sink("C:/Users/CCF/Documents/Suzie Work/PTY Project/Waterhole Correction/ungulate.txt") cat(" model{ # hyperparameters # habitat effects for each
2010 Jan 26
1
ordisymbol - changing symbols used in plotting factor levels
Hello, I'm trying plot points in an NMDS according to a factor with two levels: fig<-ordiplot(canod.sol, type="none",cex.axis=0.9,cex.lab=0.1,pty="m",tck=-0.01) ordisymbol(fig, y = hab, factor = "habitat", rainbow = T,col = env, legend = F) This gets me part of the way - It produces a plot with blue triangles for the first factor level and red circles
2011 Feb 08
1
which multivariate regression?
Hi R-Users, I have a student doing work with lionfish and she has been trying to analyse a multivariate dataset to see what variables/factors are influencing the behaviour of lionfish. We have attempted a number of analyses, including rpart, relimpo and standard linear regression but we are not having much luck with quality output. The data is very non-normal and we would appreciate some advice
2012 Dec 06
1
Fitting a multinomial model to a multi-way factorial design with repeated measures: help on package and syntax
Dear all, I studied in tank prey fish behavior. Using the design described below (and R code), I want to test the effects of both habitat and predator (and interaction) on prey fish's vertical distribution, which was recorded (with repeated measures) as a categorical variable. I found that package mlogit might fit to my need but I don't know how to specify my complex design in the
2007 Jan 23
0
New lmer: How to recode random effect ?
Dear all, I ran the following model without any problem previously to the update of lme4: fm2<-lmer(data=NGud,family=poisson, seed~hab*seedtray +(1|site)+(1|site:hab)) I have 25 sites, 2 habitats ("hab") per site, 8 seedtrays per habitat (4 as control, and 4 as treatment), and I'm interested in comparing the number of seed in seedtrays as a function of the treatment and its
2011 Dec 01
0
Error message: object 'A' not found
I ran the following code: And I run into problems with the last line of code (when it says hn<-......). I keep getting an error code: Error in distsamp(~hab ~ 1, peldist, keyfun = "halfnorm", output = "density", : object 'A' not found I would appreciate any and all help. rm(list=ls(all=TRUE)) #clear the computer's
2009 Jun 27
1
data formatting
All, I have three columns of data: id, date, hab. I am trying to set up a matrix that has the id as the rows, date as columns, and the hab value as the data values. Each id/date combination can only have one hab value. I would like for it to look something like this" date 1, date 2, date 3. id 0001 2 1 2 0002 3 5 6 I don't know how to set
2008 Oct 15
3
Removing characters and periods from character strings
Hello R-users, I have code that gives me the important variables from an analysis. I need to input these variables into a different analysis. To do this, I need to modify them slightly... 1) remove all numbers at the end of the variables, 2) remove all periods. I tried to do it with the awkward code below. It works to remove all the numbers, but when I try to remove the period everything
2011 Sep 29
1
How to Code Random Nested Variables within Two-way Fixed Model in lmer or lme
Hi All, I am frustrated by mixed-effects model! I have searched the web for hours, and found lots on the nested anova, but nothing useful on my specific case, which is: a random factor (C) is nested within one of the fixed-factors (A), and a second fixed factor (B) is crossed with the first fixed factor: C/A A B A x B My question: I have a functioning model using the aov command (see
2002 Jul 11
2
Nested anovas in R not doing what they ought to...
Hi, there I first sent this e-mail a couple months ago, to no avail.Since I am not a member on your mailing list, so could you please cc: a response to me? I'll be sure to check the list today for replies. I am currently attempting to perform an ANOVA with both nested and normal factors. My problem is that R is treating my nested factors the exact same way as it would interaction terms.
2003 Dec 05
3
Odds ratios for categorical variable
Dear R-users: How does one calculate in R the odds ratios for a CATEGORICAL predictor variable that has 4 levels. I see r-help inquiries regarding odds ratios for what looked like a continuous predictor variable. I was wondering how to get the pairwise odds ratios for comparisons of levels of a categorical predictor variable. I can't seem to get the correct output using: >
2007 Oct 04
1
Include on few directory
Hello, I would like only to sync few directories between my two Linux boxes. I tries this but no help sudo rsync -avrtzun --stats \ --include-from "include-nix" \ --exclude-from "excludes-nix" \ --delete \ --progress \ -e "ssh -l hab" /home/hab/ desktop:/home/hab excludes-nix * include-nix Development/* www/* Personal/* can you help? -- OOzy Ubuntu-Feisty
2006 Jun 08
2
nested mixed-effect model: variance components
Dear listers, I am trying to assess variance components for a nested, mixed-effects model. I think I got an answer that make sense from R, but I have a warning message and I wanted to check that what I am looking at is actually what I need: my data are organized as transects within stations, stations within habitats, habitats within lagoons. lagoons: random, habitats: fixed the question is:
2009 May 29
1
data manipulation involving aggregate
hi all, I often have a data frame like this example data.frame(sq=c(1,1,1,2,2,3,3,3,3),area=c(1,2,3,1,2,3,1,2,3),habitat=c("garden","garden","pond","field","garden","river","garden","field","field")) for each "sq" I have multiple "habitat"s each with an associated "area". I
2006 Feb 26
2
subtotal, submean, aggregate
Dear All, I would like to make partial sums (or means or any other function) of the values in intervals along a sequence (spatial transect) where groups are defined. For instance: habitats<-rep(c("meadow","forest","meadow","pasture"),c(10,5,12,6)) observations<-rpois(length(habitats),2)
2010 Oct 21
2
nested anova
Hello all, Can any of you R gurus help me out? I?m not all that great at stats to begin with, and I?m also learning the R ropes (former SAS user). Here?s what I need help with? I have a nested sample design and ran a nested anova, but I don?t know how to interpret the results habitat (four different types) is nested in site (three types), and site is nested in gear (two types)
2017 Nov 15
1
Rasterize function with maximum in R
Hi all, I have some concerns regarding the rasterize option in R and I would like to know if the fun=max in rasterize in R provides similar results to the one achieved by using "Polygon to Raster using maximum-combined-area" in ArcGIS? I'm trying to rasterize a habitat layer to a raster of 10m spatial resolution using the function 'max' (e.g. r <- rasterize(ht, r,
2009 Mar 10
1
help structuring mixed model using lmer()
Hi all, This is partly a statistical question as well as a question about R, but I am stumped! I have count data from various sites across years. (Not all of the sites in the study appear in all years). Each site has its own habitat score "habitat" that remains constant across all years. I want to know if counts declined faster on sites with high "habitat" scores. I can
2012 Jan 09
2
Unexpected results using the oneway_test in the coin package
Dear fellow R users, Keywords: Kruskal-Wallis, Post-Hoc, pair-wise comparisons, Nemenyi-Damico-Wolfe-Dunn test, coin package, oneway_test I am using the "oneway_test" function in the R package "coin" and I am obtaining results which I cannot believe are accurate. I do not wish to waste anyone's time and so if the following problem is rather trivial, I apologize, however I