similar to: Constructing a transition matrix

Displaying 20 results from an estimated 5000 matches similar to: "Constructing a transition matrix"

2007 Sep 25
2
3d barplot in rgl
Is there anyway to plot a matrix using a 3d bar plot. Something like bar3 in matlab? The example in demo hist3d does a 3d barplot for binned data, but has anyone tried something for a simple matrix with spaces betwen bars and axis labels using matrix dimnames or 1,2,3? stages<-letters[1:3] A<-matrix(c( 0.21, 0.21,0.03, 0.55, 0.58, 0.09, 1.30, 1.35, 0.22), nrow=3, byrow=TRUE,
2007 Feb 06
2
abbreviate dataframe for Sweave output
I wanted to print the first and last rows of some dataframes in Sweave using dots in columns to separate the two parts. Head and tail almost work, but I have problems with factors and row names. z<-data.frame(id=letters[1:26], x=sample(1:26,26)) rbind(head(z,3), ".", tail(z,1)) id x 1 a 18 2 b 8 3 c 14 4 <NA> . 26 z 10 Warning message: invalid
2006 Jan 23
1
Sample rows in data frame by subsets
Hi, I need to resample rows in a data frame by subsets L3 <- LETTERS[1:3] d <- data.frame(cbind(x=1, y=1:10), fac=sample(L3, 10, repl=TRUE)) x y fac 1 1 1 A 2 1 2 A 3 1 3 A 4 1 4 A 5 1 5 C 6 1 6 C 7 1 7 B 8 1 8 A 9 1 9 C 10 1 10 A I have seen this used to sample rows with replacement d[sample(nrow(d), replace=T), ] x y fac 7 1 7 B 2
2007 Nov 14
1
reading tables from url
I'm trying to read some web tables directly into R. These are both genome sequencing projects (eukaryotes and metagenomes) from NCBI and look very similar; however, only the first one works. http://www.ncbi.nlm.nih.gov/genomes/leuks.cgi http://www.ncbi.nlm.nih.gov/genomes/lenvs.cgi I added ?dump=selected to the end of the url string to get a tab- delimited file (which is what happens
2006 Jun 18
2
analyze amino acid sequence (composition)of proteins
Dear R-helpers: thank your for your attention. i am a newer to R and i am doing some protein category classification based on the amino acid sequence.while i have some questions urgently. 1. any packages for analysis amino acid sequence 2. given two sequences "AAA" and "BBB",how can i combine them into "AAABBB" 3. based on "AAABBB",how can i get some
2013 May 07
4
create unique ID for each group
Hey All, I have a dataset(dat1) like this: ObsNumber ID Weight 1 0001 12 2 0001 13 3 0001 14 4 0002 16 5 0002 17 And another dataset(dat2) like this: ID Height 0001 3.2 0001 2.6 0001
2006 Jan 23
8
In which application areas is R used?
If anyone has a list of application areas where there is extensive use of R, I'd like to hear of it. My current short list is: Bioinformatics Epidemiology Geophysics Agriculture and crop science John Maindonald Mathematical Sciences Institute, Australian National University. john.maindonald at anu.edu.au
2009 Apr 22
2
function output with for loop and if statement
Hello all, turns out i'm having a bad R week. I am at my wits end with a function that I am trying to write. When I run the lines of code outside of a function, I get the desired output. When I wrap the lines of code into a function it doesn't work as expected. Not sure what is going on here. I suspected that the syntax of the if statement with the for loop was the culprit, but when I
2017 Nov 01
1
Creating Tag
i want to tag categories to its menuname. i have a csv containing menu item name and in other csv i have a column containing some strings, i want to pick that strings from categories and look into menu items if any menu item containing that string i want to create a new column next to menu item name flagged as 1 otherwise 0 and the only condition is once a menu item flagged as 1 i don't need
2010 Nov 08
1
R help: reorder columns in an xyplot
Hello. First post, though I have read scores. Mostly i can solve my problems reading the archives, but I lack the vocabulary to ask this one right. Any social faux pais, I apologize. I am sure this is a very basic question and I am embarrassed to ask, but I spent several hours scouring the archives and trying various suggestions, but I am too new to get any of them to work. I am trying to
2012 Oct 04
4
Creating vegetation distance groups from one column
Hi R listers, I am trying to group distances of nests to the vegetation into classes that are define by (0-5m, 6-10m, 11-15m, 16-20m, 21-25m, 26-30m, 31-35m, 36-40m, 41-45m, 46-50m, 51-55m, 56-60m). Each row is a nest and all the distances to the vegetation is in a column. In plyr, I have tried - below script but I think I am going about this the wrong way and am not successful. #Veg index
2017 Dec 13
1
overlay two histograms ggplot
Hi all, How can I overlay these two histograms? ggplot(gg, aes(gg$Alz, fill = gg$veg)) + geom_histogram(alpha = 0.2) ggplot(tt, aes(tt$Cont, fill = tt$veg)) + geom_histogram(alpha = 0.2) thanks for any help! Elahe
2010 May 26
1
Fill a matrix using logical arguments?
Hello all, I am going slightly mad trying to create a table for running co-correspondence analysis. What I have is seed bank and vegetation data, and my aim is to see if the vegetation found in a site (containing several seed bank samples) can predict the composition of a seed bank sample within that site. So for this I need two tables with matching rows. I have created an empty matrix,
2012 Jan 19
2
add1 GLM - Warning message, what does it mean?
Hi All, I am wondering if anyone can tell me what the warning message below the model means? J add1(DTA.glm,~ Aeventexhumed + Veg + Berm + HTL + Estuary + Rayos) Single term additions Model: cbind(MaxHatch, TotalEggs - MaxHatch) ~ Aeventexhumed + Veg + Berm + HTL Df Deviance AIC <none> 488.86 4232.9 Estuary 1 454.96 4201.0 Rayos 3 258.80 4008.9 Warning
2012 Oct 05
3
Anova
Hi R-listers, I am trying to do an ANOVA for the following scatterplot and received the following error: library(car) scatterplot(HSuccess ~ Veg, data = data.to.analyze, xlab = "Vegetation border (m)", ylab = "Hatching success (%)") anova(HSuccess ~ Veg, data=data.to.analyze) Error in UseMethod("anova") : no applicable
2011 Feb 18
1
plot3d, color points by group
Hello I've created a 3d scatterplot, and had no problems labeling the points. However, I've been really struggling to change the color of the points based on a factor (see 'group' below). Is such a thing possible? My data look like this: food group x y z apple fruit 0.216 -0.112 -0.893 orange fruit 0.814 0.097 0.460 broccoli veg -0.239 0.240 -0.425 banana
2007 May 15
1
stacked barplot with positive and negatvie values
Hello I'm trying to create a barplot with a couple of stacked positive values and with one negative value for each group. example: trees<-c(20,30,10) shrubs<-c(12,23,9) veg<-c(2,3,4) soil<-c(-100,-123,-89) example1<-t(cbind(trees,shrubs,veg)) barplot(example1) #this works so far #but now: example2<-t(cbind(trees,shrubs,veg,soil)) barplot(example2) This shows no more
2012 Jan 25
6
How do I compare 47 GLM models with 1 to 5 interactions and unique combinations?
Hi R-listers, I have developed 47 GLM models with different combinations of interactions from 1 variable to 5 variables. I have manually made each model separately and put them into individual tables (organized by the number of variables) showing the AIC score. I want to compare all of these models. 1) What is the best way to compare various models with unique combinations and different number
2009 Aug 30
1
Stochastic (transition) matrices: how to determine distributions and variance?
(apologies for the cross-posting, and for this being a more general stats question rather than a specific-to-R one. I assure you I will be doing the actual analysis in R :) I am trying to determine the distribution and variance for a classic stochastic (transition) matrix problem such that: let x(t) be an initial state vector consisting of counts of classes A, B and C: x(t) =
2009 Jun 02
1
getting elements out of list automatically
o <- (structure(list(sand.silt = structure(list(statistic = structure(185, .Names = "W"), parameter = NULL, p.value = 0.0478835773838087, null.value = structure(0, .Names = "location shift"), alternative = "two.sided", method = "Wilcoxon rank sum test with continuity correction", data.name = ".column by site"), .Names =