Q:

How levels(factorObject)[factorObject] generate complete vector?

vectorN = c("Hello","How","are","you","you","are","Hello")
factorVectorN = factor(vectorN) 
#Value of levels(factorVectorN) is c("are", "Hello", "How", "you")
all(levels(factorVectorN)[factorVectorN] == vectorN) # returns TRUE

Can you please explain, how in above example levels(factorVectorN)[factorVectorN] create same vector as vectorN? 

A:

This is just basic subsetting. From help("["):

Indexing by factors is allowed and is equivalent to indexing by the
  numeric codes (see factor) and not by the character values which are
  printed

You already show the factor levels. Internally, a factor is just an integer vector, where each number (starting from 1) corresponds to a factor level:
str(factorVectorN)
#Factor w/ 4 levels "are","Hello",..: 2 3 1 4 4 1 2
as.integer(factorVectorN)
#[1] 2 3 1 4 4 1 2

So, if you subset the levels with these numbers, you get a character vector with the same values as the original factor:
str(levels(factorVectorN)[factorVectorN])
#chr [1:7] "Hello" "How" "are" "you" "you" "are" "Hello"

If you compare the original factor with the character vector using == your factor is coerced to character for this, too.

