Hi,
Is there a way to use log2foldchange values to heatmap instead of varianceStabilizingTransformation (vd) values?
topVarGenes <- rownames(vd) %in% rownames(res[res$padj < 0.01,])
mat <- assay(vd)[ topVarGenes, ]
df <- as.data.frame(colData(dds)[,c("time","daylength")])
pheatmap(mat, color = colorRampPalette(rev(brewer.pal(n = 9, name = "RdYlGn")))(100), cluster_rows=TRUE, show_rownames=FALSE, cluster_cols=TRUE, annotation_col=df, main="Heatmap")
Thanks.
J.

This a DataFrame, which in many ways acts like a data.frame. You can figure out what an object is with:
class(res)
Then you can look up help with:
?DataFrame
DataFrame-class package:S4Vectors R Documentation DataFrame objects Description: The ‘DataFrame’ class extends the DataTable virtual class and supports the storage of any type of object (with ‘length’ and ‘[’ methods) as columns. Details: On the whole, the ‘DataFrame’ behaves very similarly to ‘data.frame’, in terms of construction, subsetting, splitting, combining, etc. The most notable exception is that the row names are optional. This means calling ‘rownames(x)’ will return ‘NULL’ if there are no row names. Of course, it could return ‘seq_len(nrow(x))’, but returning ‘NULL’ informs, for example, combination functions that no row names are desired (they are often a luxury when dealing with large data).If you read on:
Subsetting: In the following code snippets, ‘x’ is a ‘DataFrame’. ‘x[i,j,drop]’: Behaves very similarly to the ‘[.data.frame’ method, except ‘i’ can be a logical ‘Rle’ object and subsetting by ‘matrix’ indices is not supported. Indices containing ‘NA’'s are also not supported. ‘x[i,j] <- value’: Behaves very similarly to the ‘[<-.data.frame’ method. ‘x[[i]]’: Behaves very similarly to the ‘[[.data.frame’ method, except arguments ‘j’ and ‘exact’ are not supported. Column name matching is always exact. Subsetting by matrices is not supported. ‘x[[i]] <- value’: Behaves very similarly to the ‘[[<-.data.frame’ method, except argument ‘j’ is not supported.This is a useful website for learning basic R. Read the part about:
"There are a variety of ways to identify the elements of a data frame"
http://www.statmethods.net/input/datatypes.html