similar to: R help: reorder columns in an xyplot

Displaying 20 results from an estimated 1000 matches similar to: "R help: reorder columns in an xyplot"

2012 Oct 18
1
Kaplan-Meier plotting quirks
Better would be to use interval censored data. Create your data set so that you have (time1, time2) pairs, each of which describes the interval of time over which the tag was lost. So an animal first captured at time 10 sans tag would be (0,10); with tag at 5 and without at 20 would be (5,20), and last seen with tag at 30 would be (30, NA). Then survit(Surv(time1, time2,
2012 Oct 16
2
R Kaplan-Meier plotting quirks?
Hello. I apologize in advance for the VERY lengthy e-mail. I endeavor to include enough detail. I have a question about survival curves I have been battling off and on for a few months. No one local seems to be able to help, so I turn here. The issue seems to either be how R calculates Kaplan-Meier Plots, or something with the underlying statistic itself that I am misunderstanding. Basically,
2005 Dec 06
2
Constructing a transition matrix
Hi, I would like to construct a transition matrix from a data frame with annual transitions of marked plants. plant<-c(1:6) class<-c("seed","seed", "seed", "veg", "rep", "rep") fate<-c("dead", "veg","veg","rep", "rep", "veg") trans<-data.frame(plant, class, fate)
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
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 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 =
2012 May 19
3
Q - scatterplot, plot function & trellis linear regressions???
Hi R-listers, Q1) What is the difference between the scatterplot and plot function? Q2) I am able to make a graph with the scatterplot function: scatterplot(DevelopIndex ~ Veg, + data = Turtle, + xlab = "Vegetation border (m)", + ylab = "Embryonic development index") And have been successful. But I do not know if the lines are for:
2006 Dec 30
3
getting a new factor
Hi all, Given a data frame as... > head(veg) genus species trophia type geo zone importance 1 Sphagnum subsecundum M A En 100 2 Sphagnum denticulatum M A En 200 3 Molinia caerulea M A En 300 4 Sphagnum flexuosum M A En 400 5 Juncus squarrosus M A En 500 6
2011 Feb 04
1
Easy help with plots, font size
I am trying to make some plots for a poster. Each one needs to be 6 inches by inches. Right now the fonts are too small and the plots don't read well on my poster. I am pretty much an R newbie and I can't figure out how to change the fonts. It would also be nice to know how to specify the size of the plot and maybe how to save the plots as jpeg files. Any help would be much appreciated! I
2010 May 17
1
Help with RandomForest
I'm working with the randomForest package and have successfully build a model. I'd like to go one step further however, and use the output from the model to construct a map using the output. My input data are spatial, and I have an independent set of rasterize maps for each of the predictor variables, to map the classification solution. Using the getTree function: >
2005 Aug 08
2
INDVAL and mvpart
Hi, I'd like to perform Dufrene-Legendre Indicator Species Analysis for a multivariate regression tree. However I have problems with arguments of duleg(veg,class,numitr=1000)function. How to obtain a vector of numeric class memberships for samples, or a classification object returned from mvpart? thanks in advance -- Best regards, Agnieszka Strzelczak
2005 Apr 15
1
Factor Analysis Biplot
Dear R help I am having difficulty doing a biplot of the first two factors of a factor analysis. I presume it is because the values in factor 2 for Milk and NUTS are not displayed in the component loadings. Loadings: Factor1 Factor2 RedMeat 0.561 -0.112 WhiteMeat 0.593 -0.432 Eggs 0.839 -0.195 Milk 0.679 Fish 0.300 0.951 Cereals -0.902 -0.267