Watts-College / cpp-527-fall-2021

A course shell for CPP 527 Foundations of Data Science II
https://watts-college.github.io/cpp-527-fall-2021/
2 stars 6 forks source link

Put it All Together #92

Open aawoods97 opened 2 years ago

aawoods97 commented 2 years ago

Hello!

When I am run my last chunk in the functions-demo.RMD, my output doesn't include any of the tables. I used the same format to call it in a separate chunk and it works just fine. Is there something I am missing here?

`for( i in academic.units ) {

d2 <- filter( d, Department.Description == i )

 if( nrow(d2) == 0 ) { next } 

create the salary summary by rank & gender table

pander( create_salary_table(d2))

create the top 5 salaries table

top5(d2)

build the graph

d2 %>%  
filter( Department.Description == i ) %>% 
create_salary_table( ) %>% 
build_graph( unit= i )

print the tables:

cat( paste('

',"TOP FIVE SALARIES",'

' ) )

cat( t.rank %>% knitr::kable(format="html") )

cat( '


' )

}`

aawoods97 commented 2 years ago

I figured it out! I used the cat statement with 'knitr:kable'