R

Asked • 08/09/19

Remove an entire column from a data.frame in R?

Does anyone know how to remove an entire column from a data.frame in R? For example if I am given this data.frame: > head(data) chr genome region 1 chr1 hg19_refGene CDS 2 chr1 hg19_refGene exon 3 chr1 hg19_refGene CDS 4 chr1 hg19_refGene exon 5 chr1 hg19_refGene CDS 6 chr1 hg19_refGene exonand I want to remove the 2nd column.

1 Expert Answer

By:

Megan C. answered • 08/09/19

Tutor
New to Wyzant

Biostatistician, M.S.

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.