I am both old and new to R.
I am trying to calculate diversity indices for some characteristics of corporate boards and I was fortunate to adapt the diversity function suggested by Maurit Evers (Blau index of Diversity in R). The function returns the following information
Gender MBA Degree 0.375 0.375 0.375
I would like to take this output and put it in a new data frame.
I use the code below to create vectors
#create a new table from the outcome
# Creating Vectors
x3 <- c((apply(test.data.123.2015, 2, get.GS.index, type1))
x2 <- 2015
x1 <- 123
# Creating list of vectors
x <- list(x1,x2,x3)
x
# Converting list to data frame
df<-as.data.frame(t(x))
df
This is the output I get V1 V2 V3 1 123 2015 0.375, 0.375, 0.375
I would like to get a simple table which shows
Company Year Gender MBA Degree 123 2015 .375 .375 .375
How do I split V3 into 3 columns?
I thank you in advance for any help you can give me.