Domanda

Using summary(var) gives me the following output:

PAY_BACK_ORG    
 Min.   : -16.40  
 1st Qu.:   0.00  
 Median :  26.40  
 Mean   :  34.37  
 3rd Qu.:  53.60  
 Max.   :4033.40  

I want it as a dataframe which will look like this:

Min     -16.40
1st Qu    0.00
Median   26.40
Mean     34.37
3rd Qu   53.60
Max    4033.40

How can I get it in?

È stato utile?

Soluzione

Like this?

var <- rnorm(100)
x <- summary(var)
data.frame(x=matrix(x),row.names=names(x))
##                x
## Min.    -2.68300
## 1st Qu. -0.70930
## Median  -0.09732
## Mean    -0.00809
## 3rd Qu.  0.71550
## Max.     2.58100
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top