In R I'm trying to multiply select columns in a dataframe (df1) with matching columns in a second dataframe (df2). The number of rows is unequal (just 1 for df2) and there are columns that I wish to retain but do not wish to multiply. An example follows:

```
df1 <- data.frame(group = c('A','B','C','A'), var1 = c(1,0,1,0), var2 = c(0,1,1,0))

df2 <- data.frame(var1 = 0.06, var2 = 0.04)

```

The expected result would be:

```
Group   var1   var2
A       0.06   0
B       0      0.04
C       0.06   0.04
A       0      0

```

I'm happy to adjust the format of df2 if required. A tidyverse solution would be great.

I've read several other questions attempting to do something similar but I can't get them to work in my situation e.g.

```
data.frame(Map(function(x,y) if(all(is.numeric(x),is.numeric(y))) x * y
                          else x, df1, df2))
# Multiply's by position not name

```

Thanks in advance.