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, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 7, 7, 7, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11),
val = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00127000000793487, 0.000282222230453044, 0, 0, 0.000141111115226522, 0.000282222230453044, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00070555554702878, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.000141111115226522, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
),
.Names = c("group", "val"),
row.names = c(NA, -1000L),
class = c("data.table", "data.frame"),
.internal.selfref = <pointer: 0xe4d468>
)
I can plot this as a timeseries per group, like so:
ggplot(df, aes(x=unlist(by(val, group, seq_along)), y=val, group=group)) +
geom_line(alpha=0.5)
but I want to plot a rolling mean of the data, like so:
library(zoo)
ggplot(df, aes(x=unlist(by(val, group, seq_along)),
y=rollmean(val, 48, fill=NA), group=group)) +
geom_line(alpha=0.5)
But this adds upticks to the end of each line, that do not exist in the data:
The upticks at 130 and 670 do not exist in the data, nor do they exist in the rolling mean, as you can see with rollmean(df[group==5, val], 48, fill=NA). So what is causing them?

The first uptick does occur at exactly 132. In your rolling mean, you chose the default align, which sets it to center, meaning that each point is the mean of the previous k/2 and the future k/2 points. Since you set k=48, it means that point 132 will be the mean of (132-24):(132+24). You can verify that the first non-zero point is indeed 156.
# First non-zero value
min(which(df$val!=0))
# 156
You can also verify that the first non-zero value in the rolling mean is 132.
df$rollmean <- rollmean(df$val, 48, fill=NA)
min(which(df$rollmean!=0))
# 132
Additionally, it looks like you are applying your rolling mean across all groups, which you almost certainly don't want. Try splitting by group, like you did with by to create the time variable. Here is an example:
# Set a time variable before hand
df$time <- with(df, unlist(by(val, group, seq_along)))
df$group <- as.factor(df$group)
k=48
# Remove those groups wtihout enough values for rolling mean of k window
df.subset <- df[df$group %in% names(which(table(df$group) >= k)),]
# Calculate a rolling mean on each group
df.subset$rollmean <- unlist(by(df.subset$val, df.subset$group, FUN=rollmean, k=k, fill=NA))
# Plot
ggplot(df.subset, aes(x=time,
y=rollmean,
colour=group)) + geom_line()

Related

Representing a correlation matrix without a "classical" heatmap

I'm doing some analysis on a complex network. I have computed the degree correlation matrix, which looks like this:
data[1:5, 1:5]
1 2 3 4 5
1 6 19 11 16 5
2 19 10 16 12 6
3 11 16 7 11 10
4 16 12 11 5 9
5 5 6 10 9 8
And I'd like to plot it to obtain something akin to this:
I've tried to use ggplot but the results are not at all satisfying, this is my code:
library(reshape2)
library(ggplot2)
data = melt(data)
#The "melt" function was used to turn the matrix in a three column dataframe with columns named "Var1",
"Var2", and "value"
ggplot(data = data) +
theme_bw() +
geom_tile(aes(x = Var1, y = Var2, fill = value)) +
scale_fill_viridis(name = "") +
labs(x = "k2", y = "k1")
And this is what I get:
Is there any way to fix it?
P.S. Sorry if I couldn't post the images directly, but my reputation is not high enough
EDIT: I'm putting here the dput() output of my matrix, as asked in the comments:
structure(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 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3, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 2, 0, 0, 2, 1, 1, 1, 0, 2, 1, 1, 0, 1, 1, 3, 2,
4, 0, 1, 2, 3, 4, 3, 5, 2, 4, 2, 1, 5, 2, 1, 2, 4, 2, 7, 3, 1,
0, 2, 1, 2, 3, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 2, 0, 3, 2, 1, 0, 4, 0, 0, 7, 4, 3, 2, 7, 3,
2, 7, 1, 2, 5, 0, 4, 3, 6, 10, 2, 6, 0, 7, 5, 3, 10, 4, 3, 4,
6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), dim = c(75L, 75L), dimnames = list(
c("2", "3", "5", "6", "7", "8", "9", "10", "11", "12", "13",
"14", "15", "16", "18", "19", "20", "21", "22", "23", "24",
"25", "26", "27", "28", "29", "30", "31", "32", "33", "34",
"35", "36", "37", "38", "39", "40", "41", "42", "43", "44",
"45", "46", "47", "48", "49", "50", "51", "52", "53", "54",
"55", "56", "57", "58", "59", "60", "61", "62", "63", "64",
"65", "66", "67", "68", "69", "70", "71", "72", "73", "74",
"75", "77", "79", "81"), c("2", "3", "5", "6", "7", "8",
"9", "10", "11", "12", "13", "14", "15", "16", "18", "19",
"20", "21", "22", "23", "24", "25", "26", "27", "28", "29",
"30", "31", "32", "33", "34", "35", "36", "37", "38", "39",
"40", "41", "42", "43", "44", "45", "46", "47", "48", "49",
"50", "51", "52", "53", "54", "55", "56", "57", "58", "59",
"60", "61", "62", "63", "64", "65", "66", "67", "68", "69",
"70", "71", "72", "73", "74", "75", "77", "79", "81")))
You get the lines because you have missing values. The full range is not represented in your data. Here's one way to fill in the missing values using tidyr
library(dplyr)
library(tidyr)
full_range <- function(x) seq(min(x), max(x))
data %>%
as.data.frame() %>%
tibble::rownames_to_column("Var1") %>%
pivot_longer(-Var1, names_to="Var2") %>%
mutate(across(Var1:Var2, as.numeric)) %>% {
d <- .
expand_grid(Var1=full_range(d$Var1), Var2=full_range(d$Var2)) %>%
left_join(d) %>%
replace_na(list(value=0))
} %>%
ggplot() +
theme_bw() +
geom_tile(aes(x = Var1, y = Var2, fill = value)) +
scale_fill_viridis_c(name = "") +
labs(x = "k2", y = "k1")
that looks like this

Missing value where TRUE/FALSE needed error in smcure model

I'm creating a cure model in R to predict Loan Default. I'm seeking someone to help me debug this error. I think it may have to do with my columns.
library(smcure)
smcure(Surv(DURATION, DEFAULT) ~ CHK_ACCT+HISTORY+NEW_CAR+USED_CAR+FURNITURE+`RADIO/TV`+EDUCATION+
RETRAINING+AMOUNT+SAV_ACCT+EMPLOYMENT+INSTALL_RATE+MALE_DIV+MALE_SINGLE+MALE_MAR_or_WID+
`CO-APPLICANT`+GUARANTOR+PRESENT_RESIDENT+REAL_ESTATE+PROP_UNKN_NONE+AGE+OTHER_INSTALL+RENT+
OWN_RES+NUM_CREDITS+JOB+NUM_DEPENDENTS+TELEPHONE+FOREIGN,
cureform=~CHK_ACCT+HISTORY+NEW_CAR+USED_CAR+FURNITURE+`RADIO/TV`+EDUCATION+RETRAINING+AMOUNT+SAV_ACCT+
EMPLOYMENT+INSTALL_RATE+MALE_DIV+MALE_SINGLE+MALE_MAR_or_WID+`CO-APPLICANT`+GUARANTOR+PRESENT_RESIDENT+
REAL_ESTATE+PROP_UNKN_NONE+AGE+OTHER_INSTALL+RENT+OWN_RES+NUM_CREDITS+JOB+NUM_DEPENDENTS+
TELEPHONE+FOREIGN,
model="ph", data = CD)
Error in while (convergence > eps & i < emmax) { :
missing value where TRUE/FALSE needed
Does anyone know what this error may mean?
Attached I have a subset of the data I used.
Data
structure(list(CHK_ACCT = c(0, 1, 3, 0, 0, 3, 3, 1, 3, 1, 1,
0, 1, 0, 0, 0, 3, 0, 1, 3, 3, 0, 0, 1, 3, 0, 3, 2, 1, 0, 1, 0,
1, 3, 2, 1, 3, 2, 2, 1, 3, 1, 1, 0, 0, 3, 3, 0, 3, 3, 1, 1, 3,
3, 1, 3, 1, 3, 2, 0, 1, 1, 1, 1, 3, 3, 3, 1, 3, 3, 3, 3, 0, 1,
0, 0, 0, 1, 3, 1, 3, 3, 3, 0, 0, 3, 1, 1, 0, 0, 3, 0, 3, 2, 1,
1, 3, 1, 1, 1, 3, 1, 3, 1, 3, 1, 3, 1, 0, 1, 1, 2, 1, 3, 0, 3,
0, 0, 0, 1, 0, 3, 3, 2, 1, 0, 0, 1, 1, 0, 1, 0, 3, 3, 3, 3, 3,
1, 1, 2, 2, 1, 0, 0, 3, 1, 0, 3, 0, 3, 3, 3, 2, 1, 1, 0, 0, 0,
1, 3, 3, 3, 3, 1, 3, 3, 0, 1, 3, 1, 0, 3, 1, 1, 0, 3, 0, 0, 3,
0, 3, 1, 0, 3, 1, 3, 1, 1, 0, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 1
), DURATION = c(6, 48, 12, 42, 24, 36, 24, 36, 12, 30, 12, 48,
12, 24, 15, 24, 24, 30, 24, 24, 9, 6, 10, 12, 10, 6, 6, 12, 7,
60, 18, 24, 18, 12, 12, 45, 48, 18, 10, 9, 30, 12, 18, 30, 48,
11, 36, 6, 11, 12, 24, 27, 12, 18, 36, 6, 12, 36, 18, 36, 9,
15, 36, 48, 24, 27, 12, 12, 36, 36, 36, 7, 8, 42, 36, 12, 42,
11, 54, 30, 24, 15, 18, 24, 10, 12, 18, 36, 18, 12, 12, 12, 12,
24, 12, 54, 12, 18, 36, 20, 24, 36, 6, 9, 12, 24, 18, 12, 24,
14, 6, 15, 18, 36, 12, 48, 42, 10, 33, 12, 21, 24, 12, 10, 18,
12, 12, 12, 12, 12, 48, 36, 15, 18, 60, 12, 27, 12, 15, 12, 6,
36, 27, 18, 21, 48, 6, 12, 36, 18, 6, 10, 36, 24, 24, 12, 9,
12, 24, 6, 24, 18, 15, 10, 36, 6, 18, 11, 24, 24, 15, 12, 24,
8, 21, 30, 12, 6, 12, 21, 36, 36, 21, 24, 18, 15, 9, 16, 12,
18, 24, 48, 27, 6, 45, 9, 6, 12, 24, 18), HISTORY = c(4, 2, 4,
2, 3, 2, 2, 2, 2, 4, 2, 2, 2, 4, 2, 2, 4, 0, 2, 2, 4, 2, 4, 4,
4, 2, 0, 1, 2, 3, 2, 2, 2, 4, 2, 4, 4, 2, 2, 2, 2, 2, 3, 4, 4,
4, 2, 2, 4, 2, 3, 3, 2, 2, 3, 1, 2, 4, 2, 4, 2, 4, 0, 0, 2, 2,
2, 2, 2, 2, 2, 4, 4, 4, 2, 4, 2, 3, 0, 2, 2, 2, 2, 2, 2, 4, 4,
2, 2, 0, 4, 4, 4, 4, 2, 0, 4, 2, 4, 3, 2, 2, 3, 4, 2, 4, 1, 2,
2, 2, 3, 2, 2, 4, 2, 4, 2, 4, 4, 4, 2, 4, 2, 4, 2, 4, 2, 2, 4,
4, 2, 3, 2, 2, 2, 4, 3, 2, 4, 2, 2, 2, 2, 2, 4, 1, 4, 4, 4, 4,
2, 2, 2, 4, 3, 2, 4, 1, 2, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 4, 0,
2, 3, 2, 3, 1, 2, 4, 2, 4, 3, 3, 1, 4, 4, 4, 1, 4, 2, 0, 2, 0,
2, 2, 2, 4, 4, 2, 2, 3), NEW_CAR = c(0, 0, 0, 0, 1, 0, 0, 0,
0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 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 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0), AMOUNT = c(1169,
5951, 2096, 7882, 4870, 9055, 2835, 6948, 3059, 5234, 1295, 4308,
1567, 1199, 1403, 1282, 2424, 8072, 12579, 3430, 2134, 2647,
2241, 1804, 2069, 1374, 426, 409, 2415, 6836, 1913, 4020, 5866,
1264, 1474, 4746, 6110, 2100, 1225, 458, 2333, 1158, 6204, 6187,
6143, 1393, 2299, 1352, 7228, 2073, 2333, 5965, 1262, 3378, 2225,
783, 6468, 9566, 1961, 6229, 1391, 1537, 1953, 14421, 3181, 5190,
2171, 1007, 1819, 2394, 8133, 730, 1164, 5954, 1977, 1526, 3965,
4771, 9436, 3832, 5943, 1213, 1568, 1755, 2315, 1412, 1295, 12612,
2249, 1108, 618, 1409, 797, 3617, 1318, 15945, 2012, 2622, 2337,
7057, 1469, 2323, 932, 1919, 2445, 11938, 6458, 6078, 7721, 1410,
1449, 392, 6260, 7855, 1680, 3578, 7174, 2132, 4281, 2366, 1835,
3868, 1768, 781, 1924, 2121, 701, 639, 1860, 3499, 8487, 6887,
2708, 1984, 10144, 1240, 8613, 766, 2728, 1881, 709, 4795, 3416,
2462, 2288, 3566, 860, 682, 5371, 1582, 1346, 1924, 5848, 7758,
6967, 1282, 1288, 339, 3512, 1898, 2872, 1055, 1262, 7308, 909,
2978, 1131, 1577, 3972, 1935, 950, 763, 2064, 1414, 3414, 7485,
2577, 338, 1963, 571, 9572, 4455, 1647, 3777, 884, 1360, 5129,
1175, 674, 3244, 4591, 3844, 3915, 2108, 3031, 1501, 1382, 951,
2760, 4297), SAV_ACCT = c(4, 0, 0, 0, 0, 4, 2, 0, 3, 0, 0, 0,
0, 0, 0, 1, 4, 4, 0, 2, 0, 2, 0, 1, 4, 0, 0, 3, 0, 0, 3, 0, 1,
4, 0, 0, 0, 0, 0, 0, 2, 2, 0, 1, 0, 0, 2, 2, 0, 1, 4, 0, 0, 4,
0, 4, 4, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 3, 0, 4, 0, 4, 0, 0, 4,
0, 0, 0, 4, 0, 4, 2, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 4, 4, 3, 0,
4, 1, 0, 4, 1, 0, 0, 0, 4, 0, 0, 0, 4, 2, 1, 0, 0, 0, 2, 4, 4,
4, 2, 2, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 4, 0, 0, 0, 1, 4, 3, 2,
4, 0, 3, 0, 0, 0, 0, 1, 0, 1, 0, 3, 1, 0, 0, 3, 1, 0, 1, 0, 1,
4, 1, 0, 2, 0, 2, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 4, 0, 2, 0, 0,
0, 0, 4, 3, 0, 0, 0, 0, 1, 0, 3, 1, 0, 0, 1, 0, 0, 1, 4, 0),
EMPLOYMENT = c(4, 2, 3, 3, 2, 2, 4, 2, 3, 0, 1, 1, 2, 4,
2, 2, 4, 1, 4, 4, 2, 2, 1, 1, 2, 2, 4, 2, 2, 4, 1, 2, 2,
4, 1, 1, 2, 2, 2, 2, 4, 2, 2, 3, 4, 1, 4, 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 23, 23, 27, 50, 61, 25, 26, 48,
29, 22, 37, 25, 30, 46, 51, 41, 40, 66, 34, 51, 39, 22, 44,
47, 24, 58, 52, 29, 27, 47, 30, 28, 56, 54, 33, 20, 54, 58,
61, 34, 36, 36, 41, 24, 24, 35, 26, 39, 39, 32, 30, 35, 31,
23, 28, 25, 35, 47, 30, 27, 23, 36, 25, 41, 24, 63, 27, 30,
40, 30, 34, 29, 24, 29, 27, 47, 21, 38, 27, 66, 35, 44, 27,
30, 27, 22, 23, 30, 39, 51, 28, 46, 42, 38, 24, 29, 36, 20,
48, 45, 38, 34, 36, 30, 36, 70, 36, 32, 33, 20, 25, 31, 33,
26, 34, 33, 26, 53, 42, 52, 31, 65, 28, 30, 40, 50, 36, 31,
74, 68, 20, 33, 54, 34, 36, 29, 21, 34, 28, 27, 36, 40),
OTHER_INSTALL = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1,
0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1,
0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0,
1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0,
0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0,
1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0,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 1, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
DEFAULT = c(0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0,
1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0,
0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0,
0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0,
1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0,
1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1)), row.names = c(NA,
-200L), class = c("tbl_df", "tbl", "data.frame"))

Using R to create forest plots of coefficients for regressions on subsamples

I have a dataset of chess positions made up of 100 groups, with each group taking one of 50 positions ("Position_number") and one of two colours ("stm_white"). I want to run a linear regression for each Position_number subsample, where stm_white is the explanatory variable and stm_perform is the outcome variable. Then, I want to display the coefficient of stm_white and the associated confidence interval for each regression in a forest plot. The idea is to be able to easily see which Position_number subsample gives significant coefficients for stm_white, and to compare coefficients across positions. For example, the plot would have 50 y-axis categories labelled with each position number, the x-axis would represent the coefficient range, and the plot would display a horizontal confidence bar for each position number.
Where I'm stuck:
Getting the confidence interval bounds for each regression
Plotting each of the 50 coefficients (with confidence intervals) on one plot. (I think this is called a forest plot?)
This is how I current get a list of the coefficients for each regression:
fits <- by(df, df[,"Position_number"],
function(x) lm(stm_perform ~ stm_white, data = x))
# Combine coefficients from each model
do.call("rbind", lapply(fits, coef))
And here is a sample of 10 positions (apologies if there's a better way to show reproducible data):
>dput(droplevels(dfMWE[,c("Position_number","stm_white","stm_perform")]))
structure(list(Position_number = c(0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10), stm_white = c(0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1), stm_perform = c(0.224847134350316, -0.252000458803946,
0.263005239459311, -0.337712202569111, 0.525880930891169, -0.5,
0.514387184165999, 0.520136722035817, -0.471249436107731, -0.557311633762293,
-0.382774969095054, -0.256365477992672, -0.592466230584332, 0.420100239642119,
0.35728693116738, -0.239203909010858, 0.492804918290949, -0.377349804212738,
0.498560888290847, 0.650604627933873, 0.244481117928803, 0.225852022298169,
0.448376452689039, 0.305090287270497, 0.275461757157464, 0.0232950364735793,
-0.117225030904946, 0.103523492101814, 0.098301745397805, 0.435599509759579,
-0.323024628921732, -0.790798102797238, 0.326223812111678, -0.331305043692668,
0.300230596737942, -0.340292005855252, 0.196181480575316, -0.0606495585093978,
0.789844179758131, -0.0862623926308338, -0.560150145231903, 0.697345078589853,
-0.425719796345476, 0.65321716721887, -0.878090073942596, 0.393712176214572,
0.636076899687882, 0.530184680003902, -0.567228844342952, 0.767024918145021,
-0.207303615824231, -0.332581578126777, -0.511510891217792, 0.227871326531416,
-0.0140876421179904, -0.891010911045765, -0.617225030904946,
-0.335142021445235, -0.517262524432376, 0.676301669492737, 0.375998241382333,
-0.0882899718631629, -0.154706189382, -0.108431333126633, 0.204584592662721,
0.475554538879339, 0.0840205872617279, -0.403370826694226, -0.74253555894307,
0.182570385474772, -0.484175014735265, -0.332581578126777, -0.427127748605496,
0.474119069108831, -0.0668284645696687, -0.0262098994728823,
-0.255269593134965, -0.313699742316688, -0.485612815834001, 0.302654921410147,
-0.425719796345476, 0.65321716721887, 0.393712176214572, 0.60766106412682,
0.530184680003902, 0.384135895746244, 0.564400490240421, 0.767024918145021,
0.702182602090521, 0.518699777929559, -0.281243170101218, -0.283576305897061,
0.349395372066127, -0.596629173305774, 0.0849108889395813, -0.264122555898524,
0.593855385236178, -0.418698521631085, 0.269754586702576, -0.719919005947152,
0.510072446927438, -0.0728722513945044, -0.0849108889395813,
0.0650557537775339, 0.063669188530584, -0.527315973006493, -0.716423694102939,
-0.518699777929559, 0.349395372066127, -0.518699777929559, 0.420100239642119,
-0.361262250888275, 0.431358608116332, 0.104596852632671, 0.198558626418023,
0.753386077785615, 0.418698521631085, -0.492804918290949, -0.636076899687882,
-0.294218640287997, 0.617225030904946, -0.333860575416878, -0.544494573083008,
-0.738109032540419, -0.192575818328721, -0.442688366237707, 0.455505426916992,
0.13344335621046, 0.116471711943561, 0.836830966002895, -0.125024693001636,
0.400603203290743, -0.363923100312118, -0.157741327529574, -0.281243170101218,
-0.326223812111678, -0.548774335859742, 0.104058949158278, -0.618584122089031,
-0.148779202375097, -0.543066492022212, -0.790798102797238, -0.541637702714763,
0.166337530816562, -0.431358608116332, -0.471249436107731, -0.531618297828107,
-0.135452994588696, 0.444109038883147, -0.309993792719686, 0.472684026993507,
-0.672509643334985, -0.455505426916992, -0.0304828450187082,
-0.668694956307332, 0.213036720610531, -0.370611452782498, -0.100361684849949,
-0.167940159469667, -0.256580594295053, 0.41031649686005, 0.544494573083008,
-0.675040201040299, 0.683816314193659, 0.397841906825283, 0.384135895746244,
0.634743335052317, 0.518699777929559, -0.598013765769344, -0.524445461120661,
-0.613136820153143, 0.12949974225673, -0.337712202569111, -0.189904841395243,
0.588289971863163, 0.434184796930767, -0.703385003471829, 0.505756208411145,
0.445530625978324, -0.167137309739621, 0.437015271896404, -0.550199353253537,
-0.489927553072562, -0.791748837508184, 0.434184796930767, 0.264122555898524,
-0.282408276808469, -0.574280203654524, 0.167940159469667, -0.439849854768097,
-0.604912902007957, 0.420100239642119, 0.35728693116738, 0.239220254140668,
-0.276612130560829, -0.25746444105693, 0.593855385236178, -0.632070012100074,
0.314483587504712, 0.650604627933873, -0.226860086923233, -0.702182602090521,
0.25746444105693, -0.174474012638818, 0.0166045907672774, 0.535915926945102,
0.141635395826102, 0.420100239642119, 0.557311633762293, 0.593855385236178,
0.6961287704296, 0.0444945730830079, -0.234005329233511, 0.448376452689039,
-0.86655664378954, 0.22107824319756, 0.148051654147426, 0.543066492022212,
-0.448376452689039, 0.373300918333268)), row.names = c(NA, -220L
), groups = structure(list(Position_number = c(0, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10), .rows = structure(list(1:20, 21:40, 41:60,
61:80, 81:100, 101:120, 121:140, 141:160, 161:180, 181:200,
201:220), ptype = integer(0), class = c("vctrs_list_of",
"vctrs_vctr", "list"))), row.names = c(NA, 11L), class = c("tbl_df",
"tbl", "data.frame"), .drop = TRUE), class = c("grouped_df",
"tbl_df", "tbl", "data.frame"))
confint() can get you the confidence interval of a model.
forestplot() from the forestplot R package can make you a forest plot.
library(dplyr)
library(forestplot)
results <- lapply(unique(df$Position_number), function(pos) {
fit = filter(df, Position_number == pos) %>%
lm(data = ., stm_perform ~ stm_white)
stm_white_lm_index = 2 # the second term in lm() output is "stm_white"
coefficient = coef(fit)[stm_white_lm_index]
lb = confint(fit)[stm_white_lm_index,1] # lower bound confidence
ub = confint(fit)[stm_white_lm_index,2] # upper bound confidence
output = data.frame(Position_number = pos, coefficient, lb, ub)
return(output)
}) %>% bind_rows() # bind_rows() combines output from each model in the list
with(results, forestplot(Position_number, coefficient, lb, ub))
The forest plot shows the "Position_number" labels on the left and the regression coefficients of "stm_white" with the 95% confidence intervals plotted. You can further customize the plot. See forestplot::forestplot() or this introduction by Max Gordon for details.

Error message when reorganizing duplicated columns in a dataframe with specifics names

Ive been struggling to solve this.
This is my dataframe:
df<-structure(list(CESP6.MRVE3 = c(3.39731078, 3.351139056, 3.541515582,
3.329084161, 3.117085569, 2.630336741, 3.263587913, 3.2854739,
2.115273321, 1.255217018, 0.558756742, -0.478780166, -0.667471284,
-0.814286812, -1.489226751, -1.957340764, -2.397829895, -2.106376737,
-1.799451962, -0.699075436, -0.686257093, -0.397822857, -0.079821449,
-0.532685698, -0.502453448, 0.124038498, -0.183209859, -0.207727845,
-0.421813003, -1.550648396, -0.940915675, -0.282337163, -0.282104914,
0.051723363, -0.095957822, -0.356446953, -0.586070428, -0.003895889,
-0.706760138, -0.499624387, -0.265363282, 0.33515752, -0.056408244,
-1.048118284, -1.251337786, -1.19362493, -1.519219549, -1.663016155,
-1.036524208, -1.006369535, -1.066137285, -0.991731905, -1.463586221,
-1.419036564, -1.121612261, -1.571668563, -1.494677088, -1.21322393,
-0.758818549, -0.418730576, -0.080007787, 0.240368738, 0.050667688,
-0.157657302, -0.327569328, -0.305106237, -0.070845132, 0.339675669,
0.435446235, 0.323159091, 0.305477906, 0.500815644, 0.697451866,
0.504088089, 0.185252695, 0.149946628, 0.098092312, -0.119733149,
-0.03216457, -0.430422859, 0.056069088, 0.079253559, 0.651283822,
0.302448429, 0.282680678, 0.137663163, 0.037606861, 0.175752544,
0.619292269, 0.252188188, 0.629112963, 0.504017872, 0.236836216,
-0.235883757, -0.3413341, -0.004198349, 0.018409018, 0.710295005,
0.514988938, 0.4701157, 0.528261383, 0.569070737, -0.062206474,
-0.597656818, -0.783107161, -0.670433093, -0.638114278, -0.705795463,
-0.793188095, -0.502023489, -0.202656896, -0.335732122, -0.624201387,
-0.282459676, -0.598342848, -0.705957332, -0.547667373, -0.703550544,
-0.958645635, -0.74899049, -0.367393055, 0.188666063, 0.852927168,
1.13423605, 1.400150892, 1.028440852, 0.96449997, 1.732501378,
2.084243089, 1.743609682, 1.587293682, 1.309112969, 1.048557137,
1.193750599, 1.337290323, 0.911695704, 0.793437415, 0.976832863,
0.682248176, 0.479172951, 0.59335648, 0.825741995, 0.201656837,
0.087715955, -0.200253782, -0.281464293, -0.423751438, -0.849923161,
-0.548758555, -0.775574083, -0.812678164, -0.918994164, -0.712146965,
-0.987741584, -0.999307348, -0.264546715, -0.110574162, 0.445984485,
0.453985892, 0.342420128, 0.344738943, 0.105759274, 0.000519907,
-0.4401135, -0.669592699, -0.851879843, -0.5891282, -0.32810787,
-0.253702489, -0.260806569, -0.02863203, 0.183398233, 0.067082233,
0.157891587, -0.261587611, -0.320423005, -0.704508163, -0.89442019,
-0.835053597, -0.499715859, -0.48286866, -0.675799609, -0.894779279,
-1.288575885, -1.754459056, -1.278111386, -1.262629372, -1.163618032,
-0.725183796, -0.505528651, -0.866084482, -1.142400482, -0.924687626,
-1.223090192, -0.949406191, -0.314712258, -0.191172534, 0.25963682,
0.058215332, -0.397812115, -0.393406735, -0.201598324, -0.067770047,
0.584115939, 0.347944216, 0.773070977, 0.653014674, 1.011737463,
0.958085133, 0.961624857, 1.128838184, 1.255330131, 1.110456892,
1.18112197, 1.675882603, 2.111364617, 1.567423735, 1.148732617,
1.60076288, 1.300850854, 1.642159736, 0.943546194, 0.645076929,
0.905164902, 1.041656849, 0.744552768, 1.02046761, 0.953718782,
0.627979887, 0.420442978, 0.16096378, -0.26340993, -0.277350812,
-0.239205128, -0.364511195, -0.034423222, -0.376277538, -0.197843302,
0.077061607, -0.304504157, -0.2299545, -1.078212789, -0.954884041,
-0.682276674, -0.435351899, -0.449226081, -0.174387872, -0.15653074,
-1.569106437, -1.558230383), ABEV3.JBSS3 = c(-0.125505311, -0.381380131,
-0.294037578, -0.298621426, -0.277723674, 0.387057047, 0.237627028,
-0.176649161, -0.102841696, -0.204853657, -0.010728477, -0.088211983,
0.291087137, -0.008015111, -0.500672558, -0.327838349, -0.381776712,
-0.444424104, -1.109018008, -1.502966426, -1.311740904, -1.240197666,
-1.028982199, -0.656137935, 1.150241417, 1.038229456, 1.044291093,
0.66550656, 0.792223738, 1.085375662, 0.698835245, 0.35779654,
0.052567206, 0.612173986, 0.083389453, 0.319778861, -0.009651158,
-0.512944035, -0.334300455, -0.687285673, -0.249287579, -0.843563768,
-0.350401788, -0.258858551, -0.224415656, -0.168036304, 0.283834704,
0.714414741, 0.161747239, -0.066064038, -0.374848571, -0.193950819,
-0.130798896, -0.071837601, -0.208030136, 0.039322473, -0.03913429,
0.248536034, -0.052184956, -0.222250405, -0.172315854, 0.492137096,
0.095606735, -0.194468769, -0.44615296, -0.284927438, -0.294029686,
-0.388295819, -0.078033498, -0.263580547, -0.260100853, -0.300811787,
0.256223106, 0.450348286, 0.327373124, 0.170197277, 0.040449544,
0.541357351, 0.129345389, 0.848962225, 0.541458608, 0.374610532,
0.276471485, 0.500596665, 0.462785388, 0.219492511, 0.589427062,
0.190642529, 0.064439938, 0.586956432, 0.136880927, 0.06906965,
-0.110678083, 0.292483896, 0.230154219, -0.0457206, -0.18159542,
-0.597798011, -0.384963802, -0.235357022, -0.228649899, -0.143879233,
-0.104917938, 0.0021069, -0.023450205, -0.023515654, -0.189718245,
0.384734706, 0.199177601, 0.213302781, 0.097427962, -0.441038856,
-0.135622705, -0.243433982, -0.495118173, -0.271310708, 0.030242585,
0.139531651, 0.436238773, 0.493263611, 0.217706506, 0.29989523,
0.237565553, 0.472981704, 0.566133628, 0.630258808, 0.63567496,
0.614964025, 0.536179492, 0.643532101, 0.744112137, 0.422100176,
-0.059911786, 0.03937728, 0.356412173, -0.134954303, 0.076588935,
-0.64833274, -0.674525275, -0.693299752, -0.453365201, -0.547303564,
-0.419950956, 0.089010339, 0.096362947, -0.129839643, -0.425386692,
-0.175452141, -0.193908904, -0.04075698, -0.194705398, -0.169934733,
-0.194200866, -0.047831569, 0.282748467, 0.23397399, 0.277135969,
0.233187551, 0.242158901, 0.164019854, 0.303626634, 0.454852156,
0.668987392, 0.807303201, 0.883682553, 1.13426259, 0.662896114,
0.843813977, 0.119865559, -0.090855431, -0.138666708, -0.033896042,
0.243456566, -0.103719281, -0.4641125, -0.323532464, -0.151026025,
0.359881782, 0.246578849, 0.140386314, 0.550648636, 0.674446045,
0.215661512, 0.294305092, -0.039315556, 0.12093671, -0.180429765,
0.400150271, 0.187492824, -0.08289034, -0.053918989, -0.33560318,
-0.30663183, -0.385088593, -0.155154042, -0.466520517, -0.092395337,
-0.321507641, -0.363191832, -0.394220481, -0.877205699, -0.64888989,
-0.393145968, -0.713231528, -1.132026116, -1.415646764, -0.897320899,
-0.568359605, -0.672625738, -0.239146044, 0.204333651, -0.085741854,
0.14225624, 0.26089982, -0.044657285, 0.363986295, 0.579402447,
0.411908885, 0.466679551, 0.512413417, 0.83848511, 0.994556802,
0.753835812, 0.724415849, 0.053694859, 0.08878324, 0.150008762,
0.395107198, 0.110195579, 0.093347503, -1.15091863, -0.282910481,
-0.267494329, -0.215633377, 0.022036947, -0.42029273, -0.194231093,
-0.195269798, -0.321790104, -0.20927361, -0.2899946, -0.183287477,
-0.255627209, -0.132475285, -0.411259818, -0.449716581, -0.291400772,
-0.083074907, -0.093468127, 0.092911226), ABEV3.GOAU4 = c(-0.096399151,
-0.430291395, -0.181638865, -0.199604415, -0.159431687, 0.126334543,
0.089393571, 0.136005281, -0.03229346, 0.172789718, 0.262458491,
-0.002791521, -0.021944077, -0.341429824, -0.525159639, -0.464133097,
-0.517862913, -0.67650318, -1.187509124, -1.416482581, -1.415968328,
-1.382063821, -1.091037279, -1.096116528, 0.720332754, 0.756782036,
0.796100948, 0.446452774, 0.171031998, 0.690521674, 0.704946805,
0.315973347, -0.031650677, 0.570725299, 0.068873875, 0.097688834,
-0.240430809, -0.740941134, -0.567215724, -0.573140453, -0.243983969,
-0.621932849, -0.263288653, -0.200571151, 0.036715276, 0.173668511,
0.347069065, 0.654867781, 0.597926809, 0.429790496, 0.196410541,
0.31726632, 0.459138342, 0.569311069, 0.279142271, 0.348981807,
0.16238236, 0.575433053, 0.428321318, 0.104258311, -0.019633933,
0.422912806, 0.266988077, 0.066998376, -0.116219151, -0.141298401,
-0.19722313, -0.1914569, -0.236365387, -0.491794497, -0.421288579,
-0.556880117, -0.229081401, -0.068908674, -0.212288629, -0.153465335,
-0.244479614, -0.023461407, -0.245150402, 0.308404245, 0.475357481,
0.380619757, 0.41113401, 0.592493743, 0.530633985, 0.305546401,
0.523686642, 0.160648213, 0.09591049, 0.421847483, 0.072874025,
0.106599435, 0.027276116, 0.232026103, 0.16728838, -0.080847933,
-0.246268709, -0.57456745, -0.356768734, -0.237099961, -0.399463673,
-0.2755675, 0.048149575, 0.304419759, 0.318665792, 0.226293745,
0.119352773, 0.42783454, 0.279877325, 0.32614751, 0.271059925,
-0.023507036, -0.013488402, -0.09907994, -0.29331371, -0.232295503,
-0.111114867, -0.16721036, 0.081604599, 0.206354586, 0.100592285,
0.286520943, 0.223986468, 0.446020918, 0.63331568, 0.568748719,
0.534344186, 0.447394879, 0.567396844, 0.563333837, 0.57638453,
0.429272794, 0.111144816, 0.089114295, 0.064547334, -0.286800135,
-0.064424159, -0.383909906, -0.66322489, -0.7757677, -0.517977319,
-0.71085332, -0.822704743, -0.207450802, -0.395237254, -0.352869613,
-0.887948863, -0.750150147, -0.751164425, -0.497259918, -0.400306682,
-0.512670394, -0.313522244, 0.239024494, 0.349880274, 0.379190851,
0.461891683, 0.624779948, 0.335123438, 0.374621449, 0.570216916,
0.579202638, 0.462424094, 0.78597874, 0.892257259, 0.960568264,
0.65125328, 0.363279395, -0.041466663, -0.155862861, -0.201283637,
-0.209411615, 0.040248824, 0.006015054, -0.183820553, -0.135176358,
0.13330541, 0.37533986, 0.636691258, 0.385335454, 0.52855691,
0.674160712, 0.478056884, 0.437213369, 0.120272397, 0.191469702,
0.122658672, 0.639945099, 0.628256104, 0.16096527, -0.108691239,
-0.141242384, -0.424118385, -0.467506675, -0.550203578, -0.750193279,
-0.372565326, -0.353742033, -0.329162808, -0.623567341, -0.724240093,
-0.257807481, -0.2342445, -0.1342342, -0.123378421, -0.385912896,
-0.151162909, 0.094611656, 0.096987632, 0.557835076, 0.889877861,
0.727343386, 0.861922611, 0.872095338, 0.610747869, 0.767709439,
0.921272421, 0.966526362, 1.036186801, 1.18415628, 1.129751747,
0.801794532, 0.745528276, 0.483164564, -0.102247876, -0.020375854,
-0.249007786, -0.317981244, -0.465776031, -0.340009801, -1.570170265,
-1.063900081, -1.037629896, -0.921009852, -0.63286961, -1.026932617,
-0.820491669, -0.776928688, -0.946585198, -0.885233799, -0.704386355,
-0.566254448, -0.368276634, -0.18623385, -0.294874117, -0.373172858,
-0.119951402, -0.30977034, -0.171638433, 0.042436838), CESP6.PETR4 = c(2.698640815,
2.652045837, 2.937365971, 2.693377102, 2.525824567, 2.41656399,
2.862150684, 2.900076928, 1.863639826, 1.008959961, 0.514595849,
-0.256362475, -0.403757133, -0.396946322, -0.584390173, -1.167579363,
-1.610877236, -1.383908548, -1.022309956, 0.109713073, -0.055233353,
0.190886461, 0.309187948, -0.156291597, -0.30059622, 0.286481151,
0.296480384, 0.163715631, -0.082612787, -1.340165322, -0.513087952,
0.20085019, 0.239042993, 0.382556698, 0.304313167, 0.1043124,
0.028408418, 0.758674211, 0.05223711, -0.033558189, 0.366707604,
0.694160217, 0.395916686, -0.577539063, -0.72881314, -0.754184002,
-0.987906311, -1.25343505, -0.688963788, -0.811146228, -0.74705021,
-0.734494061, -1.208907367, -1.25060588, -0.915127869, -1.405019953,
-1.62368792, -1.329858462, -1.009641863, -0.634321728, -0.350541464,
0.141639442, -0.545804409, -0.553248261, -0.633673464, -0.507395774,
-0.27893641, 0.310638386, 0.208673313, 0.225799877, 0.295641233,
0.113251723, 0.585166069, 0.603783309, 0.151709553, 0.028362486,
0.032725064, -0.136476023, -0.315568427, -0.659823856, -0.117800827,
0.221773969, 0.007795396, -0.302471931, -0.410873338, -0.39885031,
-1.085810235, -1.054211642, -0.806443275, -1.079632465, -0.657076316,
-0.557718886, -0.835380104, -1.277295984, -1.509685494, -1.144474042,
-1.155481559, -0.669095185, -0.644999167, -0.439679033, -0.185158578,
-0.231111753, -0.492336636, -0.797549622, -0.951696368, -0.476968843,
-0.262181828, -0.301116356, -0.358826767, -0.386270618, 0.215001924,
0.150164182, 0.118623546, 0.378731462, 0.158306258, -0.203076502,
-0.003926142, -0.095999899, -0.682752753, -0.681154161, -0.402003801,
0.228528551, 0.841775696, 1.033265605, 1.425179951, 1.053639314,
0.964704787, 1.641515597, 1.956835732, 1.330349437, 1.193487899,
1.195777487, 1.355085724, 1.504127401, 1.592053644, 1.398489212,
1.356839892, 1.237747488, 1.19881296, 1.2674302, 1.194556764,
1.195780113, 0.869500888, 0.80290591, 0.45232283, 0.187376404,
-0.056079345, -0.631874644, -0.631233608, -0.944047554, -0.955055071,
-0.992183169, -0.604474292, -0.697772165, -0.932501224, -0.428138645,
-0.298988286, 0.360635704, 0.634623039, 0.544039959, 0.367129227,
0.123298235, -0.054096423, -0.63590362, -0.921432358, -1.232015439,
-0.869034853, -0.513398966, -0.428503268, -0.346213679, -0.196530199,
0.07495971, 0.100171161, 0.352885186, 0.094375095, 0.056022881,
-0.44168753, -0.591846174, -0.519931829, -0.223229701, -0.391739792,
-0.527268531, -0.678759974, -0.923015403, -1.438119705, -1.252582204,
-1.313698404, -0.771359622, -0.587737234, -0.445023209, -0.593691176,
-0.827946605, -0.598371809, -0.935924344, -0.972835075, -0.444267029,
-0.493892553, -0.156973059, -0.352768357, -0.797448223, -1.040262169,
-0.991062616, -1.074676242, -0.601162537, -0.851321181, -0.469880465,
-0.580039109, -0.362162059, -0.43987247, -0.419606677, 0.092574228,
0.224863817, 0.37539617, 0.537419199, 0.865078882, 1.16970802,
0.496785391, -0.043373253, 0.531413762, 0.343594667, 0.626733129,
0.227532042, 0.32162806, 0.350196106, 0.460837142, 0.329987502,
0.442543651, 0.346373109, 0.236372342, 0.015098265, -0.060805717,
-0.328466934, 0.134454161, 0.246901626, 0.160148771, 0.629457008,
0.497541128, 0.895891808, 1.232485252, 1.229078697, 1.190252852,
0.495464304, 0.580735244, 0.968928048, 1.225314422, 0.944622658,
1.717385877, 1.537335917, 0.04526216, -0.29505436), CESP6.MRVE3.new = c(2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2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 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2)), class = "data.frame", row.names = c(NA,
-250L))
As you can seeI have columns named with begin names plus ".new"
I want do put them together, It is possible to do this with dplyr package. So the output will be:
CESP6.MRVE3|CESP6.MRVE3.new|ABEV3.JBSS3|ABEV3.JBSS3.new|ABEV3.GOAU4|ABEV3.GOAU4.new|CESP6.PETR4|CESP6.PETR4.new
This is what I am doing:
df %>%
select(flatten_chr(map(colnames(df), ~c(.x , paste0(.x , ".new")))))
This is the wrong messge I am receveing:
Error: Unknown columns `CESP6.MRVE3.new.new`, `ABEV3.JBSS3.new.new`, `ABEV3.GOAU4.new.new` and `CESP6.PETR4.new.new`
In addition: Warning message:
'glue::collapse' is deprecated.
Use 'glue_collapse' instead.
See help("Deprecated") and help("glue-deprecated").
What am I doing wrong??? Any help?

Unable to plot weekly data with ggplot2

I can plot Daily but Week yields
Error: geom_path: Each group consist of only one observation.
Do you need to adjust the group aesthetic? Yes.
With this type of data:
DailyDF2 <-
structure(list(Group.date = structure(c(15023, 15024, 15027,
15029, 15031, 15035, 15036, 15037, 15039, 15040, 15041, 15043,
15046, 15048, 15050, 15054, 15056, 15057, 15059, 15061, 15062,
15063, 15064, 15068, 15070, 15071, 15073, 15078, 15079, 15080,
15085, 15089, 15090, 15092, 15095, 15099, 15100, 15103, 15104,
15105, 15106, 15107, 15109, 15110, 15111, 15112, 15113, 15120,
15121, 15122, 15124, 15127, 15128, 15132, 15133, 15134, 15141,
15142, 15146, 15148, 15153, 15155, 15156, 15161, 15162, 15169,
15173, 15174, 15177, 15180, 15181, 15182, 15183, 15186, 15187,
15188, 15190, 15195, 15196, 15197, 15198, 15199, 15201, 15202,
15203, 15204, 15205, 15206, 15207, 15208, 15209, 15211, 15212,
15213, 15214, 15215, 15216, 15218, 15219, 15220, 15223, 15224,
15225, 15226, 15227, 15228, 15229, 15230, 15231, 15232, 15233,
15235, 15236, 15237, 15239, 15241, 15243, 15244, 15245, 15246,
15247, 15248, 15249, 15250, 15251, 15252, 15253, 15254, 15255,
15257, 15258, 15259, 15260, 15261, 15262, 15263, 15264, 15265,
15266, 15267, 15268, 15269, 15271, 15274, 15275, 15276, 15278,
15279, 15280, 15281, 15282, 15283, 15284, 15285, 15286, 15287,
15288, 15289, 15290, 15291, 15292, 15293, 15294, 15295, 15296,
15297, 15298, 15299, 15300, 15301, 15302, 15303, 15304, 15305,
15306, 15307, 15308, 15309, 15310, 15311, 15313, 15314, 15315,
15316, 15317, 15318, 15320, 15321, 15322, 15323, 15325, 15327,
15328, 15329, 15330, 15331, 15332, 15333, 15334, 15335, 15336,
15337, 15338, 15342, 15343, 15344, 15345, 15346, 15347, 15348,
15350, 15351, 15352, 15353, 15354, 15356, 15357, 15358, 15359,
15361, 15362, 15363, 15364, 15365, 15367, 15368, 15369, 15370,
15372, 15373, 15374, 15375, 15376, 15377, 15378, 15379, 15380,
15381, 15382, 15383, 15384, 15385, 15386, 15387, 15389, 15390,
15391, 15392, 15393, 15394, 15398, 15399, 15400, 15401, 15403,
15404, 15405, 15406, 15407, 15408, 15409, 15410, 15411, 15412,
15413, 15414, 15415, 15416, 15417, 15418, 15419, 15420, 15421,
15422, 15423, 15424, 15425, 15428, 15429, 15430, 15433, 15434,
15435, 15437, 15438, 15439, 15440, 15441, 15442, 15443, 15444,
15446, 15447, 15448, 15449, 15450, 15451, 15454, 15455, 15456,
15457, 15459, 15460, 15462, 15463, 15464, 15465, 15466, 15467,
15468, 15469, 15470, 15471, 15474, 15475, 15476, 15477, 15478,
15481, 15482, 15483, 15484, 15485, 15488, 15489, 15490, 15491,
15492, 15495, 15496, 15497, 15498, 15500, 15501, 15502, 15503,
15504, 15505, 15506, 15507, 15508, 15509, 15510, 15511, 15512,
15514, 15515, 15516, 15518, 15519, 15520, 15522, 15525, 15526,
15527, 15528, 15529, 15530, 15531, 15532, 15533, 15534, 15536,
15537, 15539, 15540, 15541, 15542, 15544, 15545, 15546, 15547,
15548, 15549, 15550, 15551, 15552, 15553, 15554, 15555, 15558,
15559, 15560, 15561, 15562, 15563, 15565, 15566, 15568, 15569,
15572, 15573, 15574, 15575, 15576, 15578, 15579, 15580, 15581,
15582, 15583, 15584, 15587, 15588, 15589, 15590, 15591, 15593,
15594, 15595, 15596, 15597, 15600, 15602, 15603, 15604, 15605,
15606, 15607, 15609, 15610, 15611, 15612, 15614, 15615, 15616,
15617, 15618, 15621, 15622, 15623, 15624, 15625, 15626, 15628,
15629, 15630, 15631, 15632, 15633, 15634, 15636, 15637, 15638,
15639, 15641, 15642, 15643, 15644, 15645, 15646, 15647, 15649,
15650, 15651, 15652, 15654, 15655, 15656, 15657, 15658, 15659,
15660, 15661, 15662, 15663, 15664, 15665, 15666, 15667, 15670,
15672, 15673, 15674, 15675, 15676, 15677, 15678, 15679, 15680,
15681, 15682, 15684, 15685, 15686, 15687, 15688, 15689, 15690,
15693, 15694, 15695, 15696, 15699, 15700, 15701, 15702, 15703,
15708, 15709, 15712, 15713, 15715, 15716, 15717, 15719, 15720,
15722, 15723, 15724, 15726, 15727, 15728, 15730, 15731, 15733,
15734, 15735, 15736, 15737, 15738, 15739, 15740, 15741, 15742,
15743, 15744, 15745, 15746, 15747, 15748, 15749, 15750, 15751,
15752, 15753, 15754, 15755, 15756, 15757, 15758, 15759, 15760,
15761, 15762), class = "Date"), X.hpm = c(4, 5, 3, 1, 3, 1, 2,
1, 2, 3, 1, 4, 1, 1, 14, 1, 1, 5, 1, 1, 1, 1, 5, 2, 2, 9, 0,
5, 1, 1, 1, 3, 1, 8, 1, 6, 5, 1, 2, 2, 3, 4, 1, 2, 2, 4,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)), .Names = c("Group.date",
"X.hpm", "X.hospice", "X.palliative", "X.pedpc", "X.pediatric",
"HashTag"), row.names = c(NA, -545L), class = "data.frame")
And by plotting with this code:
ggplot(DailyDF2, aes(Group.date)) +
geom_line(aes(y = HashTag, colour = "HashTag")) +
geom_line(aes(y = X.hpm, colour = "#hpm")) +
geom_line(aes(y = X.hospice, colour = "#hospice")) +
geom_line(aes(y = X.palliative, colour="#palliative")) +
geom_line(aes(y = X.pedpc, colour = "#pedpc")) +
geom_line(aes(y = X.pediatric, colour="#pediatric")) +
ylab(label="Top 5 Hash Tags Frequency") +
xlab("Day")+
theme(axis.text.x=element_text(angle=-45, hjust=0.001))
I get this:
When I use my weekly data:
WeeklyDF2 <-
structure(list(Group.date = c("2011-07", "2011-08", "2011-09",
"2011-10", "2011-11", "2011-12", "2011-13", "2011-14", "2011-15",
"2011-16", "2011-17", "2011-18", "2011-19", "2011-20", "2011-21",
"2011-22", "2011-23", "2011-24", "2011-25", "2011-26", "2011-27",
"2011-28", "2011-29", "2011-30", "2011-31", "2011-32", "2011-33",
"2011-34", "2011-35", "2011-36", "2011-37", "2011-38", "2011-39",
"2011-40", "2011-41", "2011-42", "2011-43", "2011-44", "2011-45",
"2011-46", "2011-47", "2011-48", "2011-49", "2011-50", "2011-51",
"2011-52", "2012-01", "2012-02", "2012-03", "2012-04", "2012-05",
"2012-06", "2012-07", "2012-08", "2012-09", "2012-10", "2012-11",
"2012-12", "2012-13", "2012-14", "2012-15", "2012-16", "2012-17",
"2012-18", "2012-19", "2012-20", "2012-21", "2012-22", "2012-23",
"2012-24", "2012-25", "2012-26", "2012-27", "2012-28", "2012-29",
"2012-30", "2012-31", "2012-32", "2012-33", "2012-34", "2012-35",
"2012-36", "2012-37", "2012-38", "2012-39", "2012-40", "2012-41",
"2012-42", "2012-43", "2012-44", "2012-45", "2012-46", "2012-47",
"2012-48", "2012-49", "2012-50", "2012-51", "2012-52", "2013-00",
"2013-01", "2013-02", "2013-03", "2013-04", "2013-05", "2013-06",
"2013-07", "2013-08"), X.hpm = c(9, 7, 4, 10, 16, 8, 8, 13, 7,
1, 12, 12, 12, 13, 5, 14, 10, 6, 4, 4, 5, 6, 1, 2, 3, 5, 6, 6,
34, 15, 6, 1, 4, 8, 17, 21, 10, 6, 10, 33, 15, 8, 9, 1, 5, 4,
1, 9, 13, 4, 4, 3, 0, 5, 3, 24, 14, 22, 5, 2, 14, 3, 4, 8, 13,
15, 40, 13, 6, 13, 37, 4, 2, 34, 4, 7, 12, 6, 11, 60, 23, 14,
13, 12, 7, 12, 11, 36, 23, 5, 2, 10, 10, 7, 8, 10, 2, 5, 7, 14,
30, 9, 9, 8, 25, 3, 0), X.hospice = c(2, 0, 0, 4, 2, 1, 0, 0,
0, 0, 4, 0, 3, 7, 0, 0, 3, 1, 0, 3, 1, 0, 4, 9, 7, 17, 17, 5,
13, 20, 6, 3, 16, 13, 0, 10, 6, 12, 10, 10, 8, 8, 8, 13, 11,
7, 12, 6, 5, 11, 7, 13, 14, 6, 4, 14, 9, 24, 4, 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 5, 5, 3, 0, 0, 1, 1, 1, 7, 0, 3, 1, 0, 4, 3, 0, 1,
2, 0, 1, 6, 1, 4, 0, 0, 4, 0, 1, 1, 2, 0, 1, 1, 8, 0), HashTag = c(0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0)), .Names = c("Group.date", "X.hpm", "X.hospice", "X.palliative",
"X.pedpc", "X.pediatric", "HashTag"), row.names = c(NA, -107L
), class = "data.frame")
And when I plot with a similar code:
ggplot(WeeklyDF2, aes(Group.date))+
geom_line(aes(y = HashTag, colour = "HashTag")) +
geom_line(aes(y = X.hpm, colour = "#hpm")) +
geom_line(aes(y = X.hospice, colour = "#hospice")) +
geom_line(aes(y = X.palliative, colour="#palliative")) +
geom_line(aes(y = X.pedpc, colour = "#pedpc")) +
geom_line(aes(y = X.pediatric, colour="#pediatric")) +
ylab(label="Top 5 Hash Tags Frequency") +
xlab("Week")+
theme(axis.text.x=element_text(angle=-45, hjust=0.001))
I get the following warnings:
geom_path: Each group consist of only one observation. Do you need to adjust the group aesthetic?
geom_path: Each group consist of only one observation. Do you need to adjust the group aesthetic?
geom_path: Each group consist of only one observation. Do you need to adjust the group aesthetic?
geom_path: Each group consist of only one observation. Do you need to adjust the group aesthetic?
geom_path: Each group consist of only one observation. Do you need to adjust the group aesthetic?
geom_path: Each group consist of only one observation. Do you need to adjust the group aesthetic?
And my plot looks like this:
Any ideas?
UPDATE My WeeklyDF2$Group.date is a character vector. My DailyDF2$Group.date is a "double". Should WeeklyDF2$Group.date <- as.double.POSIXlt(WeeklyDF2$Group.date) or WeeklyDF2$Group.date <- as.double(WeeklyDF2$Group.date) fix the issue?
Ista was correct: WeeklyDF2$Group.date <- as.numeric(as.factor(WeeklyDF$Group.date))
Was what I need to do to correct the issue so plotting with :
ggplot(WeeklyDF2, aes(Group.date))+
geom_line(aes(y = HashTag, colour = "HashTag")) +
geom_line(aes(y = X.hpm, colour = "#hpm")) +
geom_line(aes(y = X.hospice, colour = "#hospice")) +
geom_line(aes(y = X.palliative, colour="#palliative")) +
geom_line(aes(y = X.pedpc, colour = "#pedpc")) +
geom_line(aes(y = X.pediatric, colour="#pediatric")) +
ylab(label="Top 5 Hash Tags Frequency") +
xlab("Week")+
theme(axis.text.x=element_text(angle=-45, hjust=0.001))
The solution yielded a sequence (1,2,3,4,5,6,7.......) but better than nothing.
It would be nice to know how to plot the variables by the proper week date format in R. Would any one know how to do so? I mean, would anyone know how to convert a excel date (MM/DD/YY) as well as the odd date format pulled from an api (18FEB2011:16:24:00.00) to a week date format for R?

Resources