Displaying 20 results from an estimated 81 matches for "habs".
Did you mean:
abs
2012 Jul 07
4
replacement has length zero
I have been working on the following code but keep getting an err message. My
current thinking is that the problem is on the indexing but do not know how
to fix it. Any help please?
ungulate <- read.csv("Ungulate.csv",row.names=1)
ungulate <-
as.matrix(ungulate);colnames(ungulate)<-NULL;rownames(ungulate)<-NULL
habitat <- read.csv("Ungulate_vegetation.csv")
2011 Jun 14
1
"non-numeric argument to binary operator"
...ing above error message when I change the
value of b in the following code:
rm(list=ls())
library("Hmisc")
set.seed(4) #seems to have an effect on t(apply
b=10
pop.props = c(0.6,0.2,0.2)
x=matrix(pop.props,nrow=nn,ncol=length(pop.props), byrow=T)
print(x)
habs = rMultinom((x),b)
print(habs)
habs=t(apply(habs, 1, table))/b # works for b=10, but not for b=5???
Also when i run this code in the iteration loop, it seems that changing seed
value also has an effect on whether I get the code to run in entirety, or if
it chokes with the above error mess...
2012 Oct 26
1
Openbugs- Array Index
...}
for(j in 1:4){
AB0[j] <- sum(A[,j])
AB1[j] <- sum(A1[,j])
AB2[j] <- sum(A2[,j])
SpR0[j] <- sum(O[,j])
SpR1[j] <- sum(O1[,j])
SpR2[j] <- sum(O2[,j])
}
for(i in 1:2){
for(j in 1:4){
HabAB0[i,j] <- AB0[hab[i,j]]
HabAB1[i,j] <- AB1[hab[i,j]]
HabAB2[i,j] <- AB2[hab[i,j]]
HabSpR0[i,j] <- SpR0[hab[i,j]]
HabSpR1[i,j] <- SpR1[hab[i,j]]
HabSpR2[i,j] <- SpR2[hab[i,j]]
}
HAB0[i] <- mean(HabAB0[i,])
HAB1[i] <- mean(HabAB1[i,])
HAB2[i] <- mean(HabAB2[i,])
HSpR0[i] <- mean(HabSpR0[i,])
HSpR1[i] <- mean(HabSpR1[i,])
HSpR2[i] <- mean(HabSpR2[i,...
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
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
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:
>
2011 Jan 11
0
modified FAST Script from package SensoMineR for the R community - Reg
###Dear R users
###I have been using SensoMineR package from CRAN for most of my work in
sensory data analysis and from my usage experience, I encountered some
areas for improvement and considered ###modifying the function in
SensoMineR package for my personal use. I felt that it could be useful to
share this to the community for enabling adoption by other users where
they might require a
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
2007 Oct 02
0
Variable selection in R
Disclaimer : Short of having local statistical expertise at hand, I'm using
this list because I use R for variable selection in the context of linear
multiple regression but the questions I have relate more to basic statistics
than to R per se. Please redirect me to another appropriate list if such a
list exists.
I have the very common problem of identifying which (subset of) variables
are
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
2011 Jun 08
3
determine frequencies in a matrix by row
Hi,
I have a matrix
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,] 1 3 1 1 3 1 1 2 3 2
[2,] 1 3 1 2 1 1 1 2 2 1
[3,] 1 2 2 3 2 1 1 1 2 1
[4,] 3 2 1 1 1 3 1 2 1 2
[5,] 1 1 2 2 1 1 3 1 1 2
and want to determine how many times 1s,
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
2012 Jul 13
3
Help with R2 OpenBUGs
...n 1:20){
AB0[j] <- sum(A[,j])
AB1[j] <- sum(A1[,j])
AB2[j] <- sum(A2[,j])
SpR0[j] <- sum(O[,j])
SpR1[j] <- sum(O1[,j])
SpR2[j] <- sum(O2[,j])
}
for(i in 1:3){
for(j in 1:7){
HabAB0[i,j] <- AB0[hab[i,j]]
HabAB1[i,j] <- AB1[hab[i,j]]
HabAB2[i,j] <- AB2[hab[i,j]]
HabSpR0[i,j] <- SpR0[hab[i,j]]
HabSpR1[i,j] <- SpR1[hab[i,j]]
HabSpR2[i,j] <- SpR2[hab[i,j]]
}
HAB0[i] <- mean(HabAB0[i,])
HAB1[i] <- mean(HabAB1[i,])
HAB2[i] <- mean(HabAB2[i,])
HSpR0[i] <- mean(HabSpR0[i,])
HSpR1[i] <- mean(HabSpR1[i,])
HSpR2[i] <- mean(HabSpR2[i,])...
2005 Nov 25
1
glmmPQL
Hi,
My name is Jos?? Mar??a G??mez, and I am pretty new in R. Thus, I apologize
deeply if my questions are extremmely na??ve.I have checked several
available books and URL's, without finding any answer.
I'm trying to fit Generalized Linear Mixed Models via PQL. Below I provide
the structure of my data set. Year and Plot are random variables. Fate is
the binomial dependent. I have severe
2012 Sep 13
1
problem creating an array
Hello,
I am having trouble creating a (1000,3,201) array in R from a data set
created within the same script. My problem is that I want to take a matrix
that is 1000x603
(called "landmat") and separate this into 201 separate (1000x3) matrices.
My problem is when I try to do particular combinations of the columns. I
want to take the first 3 columns of "landmat" and create
2009 Jun 29
5
Select values at random by id value
All,
I have data that looks like below. For each id there may be more than one
value per day. I want to select a random value for that day for that id.
The end result would hopefully be a matrix with the id as rows, date as
columns and populated by the random hab value. Thanks to someone on here
(Jim) I know how to do the matrix, but now realize I need to randomly select
some of my values.
2010 Dec 01
1
Poisson GLM warning message
Hi,
I receive the following warning message when I run a poisson GLM in R:
"glm.fit: fitted rates numerically 0 occurred"
The model summary is shown below. The variable 'Species' consists of
counts of different species ranging from 0 to 4. I suspect this may
have something to do with the warning message but I'm not sure. Can
anybody help?
Thank you!
Anna
Call:
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)
2004 Oct 05
2
Installation Package "gregmisc" nicht möglich?!?
Hallo zusammen.
Da ich R zur Erstellung meiner wissenschaftlichen Arbeit brauche versuchte ich dies heute zu installieren. Zunächst in der Vrsion 1.9.1 (rw1091.exe). Ich benötige das Package "gregmisc" und installierte dies von CRAN. Bei der Installation tritt folgende Meldung auf:
trying URL `http://cran.r-project.org/bin/windows/contrib/2.0/gregmisc_2.0.0.zip'
Content type