Skip to content

Lab 01  #2

@JaesaR

Description

@JaesaR

@Dselby86 @lecy

Hi, I'm having trouble starting the lab - I've loaded the data according to the instructions, but when I go to make the table for Q1a I am running into an error.

My code is:

# Q1a: create Time, TimeSince, and Treatment variables

passengers$Y <- round(passengers$Y ,1)

d.temp <- rbind( head(passengers), c("...","...","...","..."),
                 passengers[ 198:200, ], 
                 c("**START**","**TREATMENT**","---","---"), 
                 passengers[ 201:204, ],  
                 c("...","...","...","..."),
                 tail(passengers) )

row.names( d.temp ) <- NULL  
pander( d.temp )


and it is returning with the error: Error in passengers[198:200, ] : incorrect number of dimensions

I think it has something to do with the way that the data is loaded as a list rather than a matrix...? I'm really not sure but any help here would be appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions