How about:
Grid[Join[{{Style["xval", 10], Style["yval", 10]}},
Table[{x, 3 x - 2}, {x, 0, 5}]], Frame -> All]
Ok so there has to be an easy way to do this. If not I'm severely disappointed in mathematica developers, but for some reason I can't figure it out.
I'm writing problems for an 8th grade text book involving tables and graphs. I want to know how to make a two column table with the headings x and y, and also have the frames throughout the table. Here are the examples I've been trying:
TableForm[Table[{x, 3 x - 2}, {x, 0, 5}],
TableHeadings -> {None, {x, y}}]
This gives a good table and the headings I want, except it doesn't include the frame like I want, and unfortunately the commands "Dividers" and "Frame" aren't valid in the table form function.
Grid[Table[{x, 3 x - 2}, {x, 0, 5}], Frame -> All]
This gives all the values and frame that I want, but no headings. The only other way I can think of is to do something like:
Grid[{{x, y}} \[Union] Table[{x, 3 x - 2}, {x, 0, 5}], Frame -> All]
which essentially adds the value {x,y} into my list making them appear in my grid. The problem now is that the grid sorts all of the integers first, leave {x,y} at the very bottom. I've tried playing around with the "sort", and "order" commands but can't figure anything out. Does it really have to be that complicated? I feel like there should be a really easy way to do this.