Add ggplot code, fix assignment of sources
Fixed error in APCA function