Hi All, Here is the problem: I'm trying to generate a number of Fourier Descriptors figures for an experiment. All I need is that they are created within a loop and saved with sequential names (e.g., s1_1.png, s1_2.png etc..) in my directory.
I created a nested loop with a counter for the different amplitudes for the actual shapes and a counter for the file names. This script: *count <- seq(1, 7, 0.06) for (i in 1:count){ for (s in 1:length(count)){ png("~/Desktop/EMAS/FD_stimuli/s1_",s,".png") plot(create.fourier.descriptor(amplitude = c(0, i, 0, 0))); dev.off() } }* .... gives me the following error: /Error in switch(units, `in` = res, cm = res/2.54, mm = res/25.4, px = 1) * : non-numeric argument to binary operator In addition: Warning message: In 1:count : numerical expression has 101 elements: only the first used/ it seems to be a problem with the resolution of each picture which is different one form the other. In principle this shouldn't be a problem if every time a new png is created. could you help me with this? Thank you very much Best, Ale -- View this message in context: http://r.789695.n4.nabble.com/Fourier-descriptors-created-in-a-loop-tp4632414.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.