list of expressions as its argument.
> This approach gives you more control over the legend and choice of
> fill colors at the expense of a couple of lines of code. To change the
> axis and legend titles, one can use the labs() function; e.g.,
>
> last_plot() + labs(x = "Visibili
Hi
I am trying to add a less than equal sign to a plot. I have previously done
this using unicode but is not working in this instance. Any suggestions
would be great
thanks
example code:
library(ggplot2)
df<-data.frame(vis=c(0,0,1,1) , count=c(10,15,20,10) , grp=c(0,1,0,1))
df$grp <-factor(df$g
or just
levels(df$y)[5:7]<-"others"
Ista Zahn wrote
> Hi Lorenzo,
>
> On Mon, Mar 25, 2013 at 6:18 PM, Lorenzo Isella
> <
> lorenzo.isella@
> > wrote:
>> Dear All,
>> Probably something very easy, but I am looking for the most efficient
>> ways
>> to achieve this.
>> Consider the following sn
or this with Pete's example
orig[,order(orig[2,])]
Pete Brecknock wrote
>
> fitz_ra wrote
>> I know this is posted a lot, I've been through about 40 messages reading
>> how to do this so let me apologize in advance because I can't get this
>> operation to work unlike the many examples shown.
does this work for you?
df1 = data.frame(x = rnorm(100))
df1$type = ifelse(df1$x <= 0 , "type1", "type2")
df1$group<-1
df2 = data.frame(x = rnorm(50,0,2))
df2$type = ifelse(df2$x <= 0 , "type1", "type2")
df2$group<-2
combined.df<-rbind(df1,df2)
boxplot(combined.df$x ~ combined.df$group *co
look at dev.new() to specify plot window size
and then ?layout to specify number and size of each plot in the window
Jiaqi.Zhang wrote
> Hi, all,
>
> I am working on the following code to learn how to plot graphs together. I
> used the par(mfrow=c(1,3)) function to try to put all three plot()
Hi
for the loop section runif needs curved brackets
Try
IAP <-NA
for (i in 1:Sample.Size){
if (DataSet$SES[i]>0) {
IAP[i] <- ifelse(runif(1)>0.75, 1, 0) # High SES, higher
chance to be in
Treatment #
}
else {
IAP[i] <- if
perfect.
thanks for the quick reply
soon yi wrote
> Hi
>
> I have a list such as this
>
> list(c("q","w"),"r",c("r","w"),c("q","w"))
>
> How do i create a table to include the count of groups
Hi
I have a list such as this
list(c("q","w"),"r",c("r","w"),c("q","w"))
How do i create a table to include the count of groups of terms please?
ie so output is like / similar to
q","w""r" "r","w"
211
thanks for any help
--
View this message in contex
Thank you.
Rather embarrassed. Its fair to say i had rather over comlicated my attempts
to do this.
sy
soon yi wrote
> Hi
>
> I am using geom_smooth to fit linear regression lines over a scatterplot
> for two treatment groups. The default colour for the two lines are blue. I
> h
them to be black.
Adding colour="black" into the geom_smooth aesthetic does not change the
line colour to black.
thanks, sy
soon yi wrote
> Hi
>
> I am using geom_smooth to fit linear regression lines over a scatterplot
> for two treatment groups. The default colour for
Hi
I am using geom_smooth to fit linear regression lines over a scatterplot for
two treatment groups. The default colour for the two lines are blue. I have
been unable to change this with the usual options. A search online has not
suggested any solution / work around.
Is there a solution to this?
Hi
I am using ggplot to overlay two regression lines on a scatter plot each
corresponding to a treatment group.
The default plot gives a different slope for each treatment group. However,
in some cases i want the lines to be parallel -ie no significant
interaction.
My code:
ggplot(data=df,X,Y,
170 predictors - perhaps try lasso regression
--
View this message in context:
http://r.789695.n4.nabble.com/Re-update-fit-removing-insignificant-variables-tp4650379p4650394.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-pr
#Data
df<-data.frame(id=letters[1:10],var1=rnorm(10,10,5),var2=rnorm(10,5,2),var3=rnorm(10,1,1))
#Missing
df$var1[2]<-df$var2[c(2,6)]<-df$var3[c(2,5)]<-NA
na.replace<-seq(1:ncol(df))-1
df[,names(df)]<-sapply(1:dim(df)[2], function(ii)
{ifelse(is.na(df[,ii]),na.replace[ii],df[,ii])} )
David Ro
Hello
I am using sem to look at the direct effect of one variable on another but i am
uncertain if i am progressing correctly.
An example:
covar1<- matrix(c(0.4,-0.2,3,-0.2 , 0.3,-2 , 3 ,-2 , 60), nrow=3,byrow=T)
rownames(covar1)<-colnames(covar1)<-c("endo","exo","med")
path1<-matrix(c( "
16 matches
Mail list logo