rainfall_mm= c(t(scotland_weather[c(TRUE,FALSE)])))
Which works fine...but I am looking for a tidyr solution.
Regards,
Fahad Usman
Network Engineering | CIO | OpenreachÂ
Web: www.openreach.co.uk
-Original Message-
From: Ista Zahn [mailto:istaz...@gmail.com]
Sent: 17 December 2015 19:
]
Sent: 17 December 2015 20:02
To: Ista Zahn; Usman,F,Fahad,BVG1C3 R
Cc: r-help@r-project.org
Subject: RE: [R] Gather columns based on multiple columns using tidyr
Here's another approach, but it doesn't use tidy or dplyr:
> Rain.col <- seq(1, 24, by=2)
> Year.col <- seq(2, 24, by =2
Hi,
Sorry for this direct approach but I am stuck with a stupid data that I would
like to reformat.
The datafile is location at: fileURL <-
http://www.metoffice.gov.uk/pub/data/weather/uk/climate/datasets/Rainfall/ranked/Scotland.txt
You can read the data by:
Hi Fahad,
Easier than what? You didn't tell us what you tried, nor why you were
unhappy with it. I'm only passingly familiar with tidyr, but I came up
with
library(tidyr)
library(dplyr)
read.table("scotland_rainfall.txt", skip = 7, header=TRUE, fill = TRUE) %>%
select(-WIN, -SPR, -SUM, -AUT,
TX 77840-4352
-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Ista Zahn
Sent: Thursday, December 17, 2015 1:49 PM
To: fahad.us...@openreach.co.uk
Cc: r-help@r-project.org
Subject: Re: [R] Gather columns based on multiple columns using tidyr
Hi Fahad,
Eas
5 matches
Mail list logo