I am making a scatter plot of two variables and would like to colour the points by a factor variable. Here is some reproducible code:
My first post and I\'m very new to R so this may be a lob.I have search all over for a solution though, so I\'m finally posting for help.Let me know if I need to clarify or provide more information.
For on the dataframe AB: AB<-data.frame(ID=c(1,2,4),A=c(2,8,8),B=c(6,2,2),dE=c(0,0,0)) I would like to apply the following formula: AB$dE=AB$B/AB$A
My intention was to write several functions aimed at finding the overall similarity between two covariance matrices, either by multiplying them with random vectors and correlating the response vectors
Is there some way to source an R script 开发者_如何学Pythonfrom the web? e.g. source(\'http://github.com/project/R/file.r\')
I have a data set that includes cases by year and month.Some months are missing, and I\'d like to create rows with a case count of zero for those months.
I have a large dataframe with classification information. Here is an example: > d <- data.frame(x = c(1,2,3,4), classification = c(\"cl1.scl1\", \"cl2\", \"cl3-bla\", \"cl4.subclass2\"))
I am running the same regression with small alterations of x variables several times. My aim is after having determined the fit and significance of each variable for this linear regression model to vi
I have some data that looks a bit like this: require(zoo) X <- rbind(c(date=\'20111001\', fmt=\'%Y%m%d\'),
I have a data frame like the following: year incomegroup 1200827907Under25 2200925522Under25 3201026777Under25