So Istvan wants me to fish in the dark, so I think I now understand what the problem is. First a hint:
Simply copypasting code doesn't take you anywhere, you need at least basic understanding of programming, I am not even saying R-programming. So please don't use code that you don't understand for your analyses.
Here are the rules that you should check and that are violated:
- If you want to use a variable, you need to assign data to it first (like with dt, vs. x) and in many you also need to declare the variable. Unfortunately, R is not good in enforcing that, but most programming languages do.
- Don't use reserved words or names of core functions as variable names (
new, t, gc, matrix, ...), you will give yourself hell of a time trying to debug or read this code. Unfortunately, again, R has only very few reserved words and even core functions are not protected against overwriting or using for variables.
- Values assigned to variable A (ds1) do not magically appear to be assigned to another variable B (x) unless you do some really weird stuff.
R is maybe about the worst language to choose to start learning programming (maybe alongside PHP), because it doesn't enforce any of the good programming habits. So maybe, maybe, you want something like:
write.fasta(_ds1_ , names=names(_ds1_), file="sample.fasta", nbchar=60)