I am trying to use if...else loop and have included a code snippet which I
might like to expand.
Maybe you could steer me in the right direction.
library(stats)
library(prob)
{
a <- sample ( 1:4,100, replace=T,prob=c(0.1,0.2,0.5,0.3))
b<-sample(3:6,100,replace=T,prob=c(0.2,0.2,0.2,0
Dear R help
I was hoping you might be able to show me how to write a loop function take
would ccomplish this task.
library(prob)
{
a <- sample ( 1:20, 100, replace=T)
b<-sample(5:24,100,replace=T)
}
dd <- data.frame(a,b)
dd
# code piece I am looking for
if(subset(dd,c(1,23,ordered=F))is found))(
Dear Sir,
Please excuse my akwardness as I a new to R and computers, but would kindly
appreciate help.
{
a <- sample (1:10,100,replace=T )
b <-sample(10:20,100,replace=T)
c <- sample(20:30,100,replace=T)
d <- sample(30:40,100,replace=T)
e <- sample(40:50,100,replace=T)
}
d1 <- a
d2 <- b
d3 <-c
d4
3 matches
Mail list logo