search for: x_long

Displaying 3 results from an estimated 3 matches for "x_long".

Did you mean: u_long
2018 May 29
0
Convert daily data to weekly data
...if you also want to summarise by that. > x <- structure(list(X1986.01.01.10.30.00 = c(16.8181762695312, 16.8181762695312, + 18.8294372558594, 16 .... [TRUNCATED] > library(tidyverse) > library(lubridate) > # convert to long form > x_long <- gather(x, key = 'date', value = "value", -ID) > # change the date to POSIXct > x_long$date <- ymd_hms(substring(x_long$date, 2, 19)) > # add the week of the year > x_long$week <- week(x_long$date) > x_long$year <- year(x_long$date) > # average...
2018 May 29
3
Convert daily data to weekly data
Dear Petr, Thanks for your reply and the solution. The example dataset contains data for the first six days of the year 1986. "X1986.01.01.10.30.00" is 01 January 1986 and the rest of the variable is redundant information. The last date is given as "X2016.12.31.10.30.00". I realized that I missed one information in my previous email, I would like to compute the weekly average
2010 May 20
2
reshaping data
Hello, I am a relatively new R-user who has a lot to learn. I have a large dataset that is in the following dataframe format: red A B C green D blue E F Where red, green and blue are "species" names and A, B and C are observations (corresponding to DNA sequences). Each observation can only belong to one species. I would like to list the observations in one column, with the species