Combining vectors of unequal length into a data frame

前端 未结 3 1808
伪装坚强ぢ
伪装坚强ぢ 2020-12-06 06:04

I have a list of vectors which are time series of inequal length. My ultimate goal is to plot the time series in a ggplot2 graph. I guess I am better off first

3条回答
  •  我在风中等你
    2020-12-06 06:36

    If you're doing it just because ggplot2 (as well as many other things) like data frames then what you're missing is that you need the data in long format data frames. Yes, you just put all of your response variables in one column concatenated together. Then you would have 1 or more other columns that identify what makes those responses different. That's the best way to have it set up for things like ggplot.

提交回复
热议问题