I lose my R markdown code when I knit the file to html



After I create an R markdown file and knit the file as htms, I no longer see my R markdown code. I see a widow, with the name of my original R markdown code followed by .html, e.g. mycode.html. When I am in the mycode.html window and click preview I see the output document that was created, i.e. a display of the results of creating HTML code and viewing the code in an html viewer. I do not see the tab the contains my original R markdown code, i.e. the mycode.Rmd tab. I need to return to my R markdown file so I can edit the code. I can't make the Rmarkdown window reappear.
Thank you,


Can you clarify what you mean by "no longer see"? Otherwise, it sounds like your Rmd editor may just be hidden behind your HTML viewer.


I don't see the tab the contains my code. All I see is a tab that has the name xxx.htm. where xxx is the name of my code file, i.e. xxx.Rmd



So, to clarify, is the problem that RStudio actually closes after knitting to HTML? Screen shots would be useful here, as well as information about your OS.