Re: [R] plotting longitudinal data with ggplot

2017-03-11 Thread Ulrik Stervbo
You need to set the aesthetic 'group' to something meaningful, probably ID in this case. HTH Ulrik On Fri, 10 Mar 2017, 19:30 Rayt Chiruka, wrote: > i am trying to convert a dataset from wide to long format using package > tidyr- (seems to have been done) > > wen in try

[R] plotting longitudinal data with ggplot

2017-03-10 Thread Rayt Chiruka
i am trying to convert a dataset from wide to long format using package tidyr- (seems to have been done) wen in try and plot the long dataset using ggplot i keep getting errors here is the code *library(tidyr) ht.long<-gather(ray.ht ,age,height,X0:X84,factor_key = TRUE)

[R] Plotting longitudinal data

2010-09-07 Thread Jukka Koskela
Hello, Hope that someone could help me plotting longitudinal data below: 7213330001 0.8300 13.05.091 1 330001 0.8700 09.02.05NULL 4797330001 0.7700 21.03.07NULL 2399330001 0.7800 12.04.06NULL 2400

Re: [R] Plotting longitudinal data

2010-09-07 Thread Dennis Murphy
Hi: There are several problems; see inline. On Tue, Sep 7, 2010 at 9:27 AM, Jukka Koskela jukka.kosk...@helsinki.fiwrote: Hello, Hope that someone could help me plotting longitudinal data below: Firstly, you want to use NA in place of NULL as the missing value code. This is easy to change

Re: [R] Plotting longitudinal data

2010-09-07 Thread Joshua Wiley
Hi, Reading in (and slightly editing your data, so that patient_id is a factor, and the date is class date). Results of dput() provided for others' benefit. dat - structure(list(V1 = c(7213, 1, 4797, 2399, 2400, 7230, 2, 4798, 4799, 2401, 3, 7233, 4, 4800, 2402, 7258), patient_id =