similar to: determine frequencies in a matrix by row

Displaying 20 results from an estimated 300 matches similar to: "determine frequencies in a matrix by row"

2011 Jun 14
1
"non-numeric argument to binary operator"
Hello, For reasons unclear to me I am getting 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)
2012 Jul 13
4
R-squared with Intercept set to 0 (zero) for linear regression in R is incorrect
Hi, I have been using lm in R to do a linear regression and find the slope coefficients and value for R-squared. The R-squared value reported by R (R^2 = 0.9558) is very different than the R-squared value when I use the same equation in Exce (R^2 = 0.328). I manually computed R-squared and the Excel value is correct. I show my code for the determination of R^2 in R. When I do not set 0 as the
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)
2009 Nov 05
2
Using a by() function to process several regression (lm()) functions
Hello, Thank you very much for looking at this. I have a "seasonal" user for R. I teach my undergrads and graduates students statistics using R and often find myself trying to solve problems to process student collected data in an efficient way. In this case, I have a data.frame with multiple observations. These are gas concentrations in a chamber and are used to measure into rates,
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")
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
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
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
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.
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
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:
2004 Apr 06
1
indications.conf settings for spain
Aqu? tienes, [es] description = Spain ringcadence = 1500,3000 dial = 425 busy = 425/200,0/200 ring = 425/1500,0/3000 congestion = 425/200,0/200,425/200,0/200,425/200,0/600 callwaiting = 425/175,0/175,425/175,0/3500 dialrecall = !425/200,!0/200,!425/200,!0/200,!425/200,!0/200,425 record = 1400/500,0/15000 info = 950/330,0/1000 dialout = 500 Sergio Serrano Revuelto Avanzada 7 Original Message:
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
2010 Nov 03
2
memory allocation problem
Hi R users I am trying to run a non linear parameter optimization using the function optim() and I have problems regarding memory allocation. My data are in a dataframe with 9 columns. There are 656100 rows. >head(org_results) comb.id p H1 H2 Range Rep no.steps dist aver.hab.amount 1 1 0.1 0 0 1 100 0 0.2528321
2017 Nov 25
2
Problem with not fixable dangling forward links
On Fri, 2017-11-24 at 11:55 +1300, Andrew Bartlett via samba wrote: > On Tue, 2017-11-21 at 11:21 +0100, Achim Gottinger via samba wrote: > > Hello List, > > > > In preparation to update my samba ad-dc's running debian wheezy with > > backported samba 4.6.8 to 4.7.3. > > I'd like to fix two errors showing up in dbcheck whom hab been reported > > by
2015 Oct 27
3
pregunta
Estimados Cuando existia epicalc, había una manera muy fácil de determinar la media de una variable (en esta caso Gain) por grupos, en este caso (Diet). ?Como se puede hacer ahora? Diet Gain 1 d1 270 2 d1 300 3 d1 280 4 d1 280 5 d1 270 6 d2 290 7 d2 250 8 d2 280 9 d2 290 10 d2 280 11 d3 290 12 d3 340 13 d3 330 14 d3 300 15 d3 300
2017 Nov 21
2
Problem with not fixable dangling forward links
Hello List, In preparation to update my samba ad-dc's running debian wheezy with backported samba 4.6.8 to 4.7.3. I'd like to fix two errors showing up in dbcheck whom hab been reported by dbckech --cross-ncs for an long time but without causing any issues so far. I'm getting this error on my main dc root at server:~# samba-tool dbcheck --cross-ncs Checking 4188 objects ERROR: no