Skip to content

Extract from class object ltraj.

2 messages · Dylann Kersusan, Sarah Goslee

#
Hi Dylann,

On Tue, Jun 11, 2013 at 11:36 AM, Dylann Kersusan
<kersusan.dylann at gmail.com> wrote:
You're conflating class and name.

A ltraj object is a list of data frames. Your list happens to only
have one data frame, but there can be many. That data frame has 10
columns, and str() gives the names, as would
names(ltrj.obj[[1]])

length(ltrj.obj) # should be 1, based on the output you showed

ltrj.obj[[1]]$dist

will give you what you're looking for, as would

ltrj.obj[[1]][['dist']]