DataFrame showAsCell function
1
0
Entering edit mode
@vedranfranke-7218
Last seen 3.5 years ago
Germany

Quite often I use a DataFrame objects as columns in other DataFrame object.

The inbuilt showAsCell generic does not natively support this - would it be possible to include

such a function into one of the next releases of the s4vectors package?

I use the following method:

 

setMethod("showAsCell",signature("DataFrame"),
          function(object){
              cnams = paste(colnames(object),collapse=':')
              if(nchar(cnams) > 10)
                  cnams = paste0(substring(cnams, 1,10),'...')
              rep(cnams, nrow(object))
}) 

 

Best regards, 

Vedran

s4vectors • 575 views
ADD COMMENT
0
Entering edit mode
@michael-lawrence-3846
Last seen 7 weeks ago
United States

This issue has been resolved in S4Vectors 0.11.19.

ADD COMMENT

Login before adding your answer.

Traffic: 361 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6