This idea is very simple and helpful. But one has to start with 0.05.
Thanks.
test.df$n<- seq(0.05,1, by=0.05)
2013/1/24 Rui Barradas
> Hello,
>
> try the following.
>
> test.df$Var1 <- seq(0,1, by=0.05)[-1]
> test.df
>
>
> Hope this helps,
>
> Rui Barradas
>
> Em 24-01-2013 17:39, Wim Kreinen
df[,1]<-as.numeric(gsub(".*,(.*)]","\\1",test.df[,1]))
test.df
# Var1 Freq
#1 0.05 68
#2 0.10 87
#3 0.15 85
#4 0.20 72
#5 0.25 65
#6 0.30 73
#7 0.35 74
A.K.
- Original Message -
From: Wim Kreinen
To: r-help@r-project.org
Cc:
Sent: Thursday, Januar
help@r-project.org
Cc:
Sent: Thursday, January 24, 2013 12:39 PM
Subject: [R] From table to data.frame
Hello,
I have a dataframe (test.df) with intervals that were generated by table
(see below). I would prefer a dataframe labeled like this:
> test.tab <- table(cut(skn.test$density, seq (
Hello,
try the following.
test.df$Var1 <- seq(0,1, by=0.05)[-1]
test.df
Hope this helps,
Rui Barradas
Em 24-01-2013 17:39, Wim Kreinen escreveu:
Hello,
I have a dataframe (test.df) with intervals that were generated by table
(see below). I would prefer a dataframe labeled like this:
tes
4 matches
Mail list logo