My suggested approach:
dta <- structure(list(Prod_name = c("Banana", "Apple", "Orange",
"Yoghurt",
"Eggs", "Milk", "Day_num"), X1.1.2000 = c("1", "0", "4", "3",
"6", "2", "1"), X2.1.2000 = c("2", "4", "1", "5", "3", "0", "2"
), X3.1.2000 = c("1", "5", "2", "3", "0", "4", "3"), X4.1.2000 = c("2"
Dear all,
I believe that this will be a more helpful way to put the problem:
structure(list(Prod_name = c("Banana", "Apple", "Orange", "Yoghurt",
"Eggs", "Milk", "Day_num"), X1.1.2000 = c("1", "0", "4", "3",
"6", "2", "1"), X2.1.2000 = c("2", "4", "1", "5", "3", "0", "2"
), X3.1.2000 = c("1", "5",
Please use Reply-all to keep the mailing list in the loop. I cannot provide
private assistance, and others may provide valuable input or respond faster
than I can.
It is very common that people cannot provide the original data. That means more
work for YOU, though, not for us. It is up to yo
The "c" function creates vectors. Rows of data frames are data frames, not
vectors.
new_row <- data.frame( Prod_name = "Day_name", `Date 1`=1, `Date 2`=2,`Date
3`=3 )
data_may <- rbind( new_row, data_may )
Furthermore, data frames are NOT spreadsheets. "Day_num" looks suspiciously
UNlike a
Dear All,
I am relatively new to R and certainly new to the e-mailing list. I need
your help. I am working on a data frame, which looks like this:
Prod_name | Date 1 | Date 2 | Date 3 |
--|-||--|
Product 1| 3 | 4 |
5 matches
Mail list logo