Question: I'm making a table using formattable and I'd like to hide the column titles for the descriptive columns.

So for example, for dataframe "df" I'd like the resulting table to only show the column titles for msmt1, 2, and 3 and then have blank title names for the "site" and "variable" columns.

```
library(formattable)
df<-data.frame("site" = rep(c("1", "2"), 3),
              "variable" = c("C", "C", "O", "O", "N", "N"),
              "msmt1" = runif(6),
              "msmt2" = runif(6),
              "msmt3" = runif(6))
formattable(df)

```

Replacing the df column names with " " makes them show up as "X." in the table.

Is this possible in formattable?

Answer: 
I would say that the *idiomatic Go way* would be just populating the struct's fields from your map. Go favors explicitness this approach is the more direct and the easiest to read. In other words, your approach is correct.

You could make it slightly nicer by initializing the struct directly:

```
s := &MyStruct{
  AColumn: m["columnA"],
  BColumn: m["columnB"],
  CColumn: m["columnC"],
}

```

Now, if your structure has 100s of fields (which is an odd design choice), you may want to [leverage some code generation](https://blog.golang.org/generate). Otherwise, just go with the straightforward code - it's the best approach in the long term.
I already posted a library that I made for some stuff I have needed sometimes, I've made a MapToStruct fews months ago, I pushed that today to share with you the full library. The library is based in the usage of reflect, I still testing and implementing stuff, you will find some odd comments and these kind of things.

<https://github.com/FedeMFernandez/goscript>

I Hope it is useful