R

Asked • 05/27/19

Add row to dataframe?

In R, how do you add a new row to a dataframe once the dataframe has already been initialized?So far I have this: df<-data.frame("hi","bye") names(df)<-c("hello","goodbye") #I am trying to add hola and ciao as a new row de<-data.frame("hola","ciao") merge(df,de) #adds to the same row as new columns #I couldnt find an rbind solution that wouldnt give me an errorAny ideas?

1 Expert Answer

By:

Kaley W. answered • 05/28/19

Tutor
5.0 (304)

B.S. Computer Science Graduate

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.