Skip to main content
13 events
when toggle format what by license comment
Jan 9, 2013 at 1:50 history edited image_doctor CC BY-SA 3.0
added 16 characters in body
Jan 9, 2013 at 1:49 comment added image_doctor @skratch Apologies, I'd short cut in my dev version. Excellent glad you worked it out anyway. I'll update my answer accordingly.
Jan 8, 2013 at 20:45 vote accept skratch
Jan 8, 2013 at 20:45 comment added skratch Deleted a comment because I was dumb. However, the point still stands from the deleted comment that I had to add //ToExpression to your definition of ns to get it to work. The numbers were not being treated as actual numbers, it would seem.
Jan 8, 2013 at 19:52 comment added skratch Forgot about FileNameTake. Should be ok now!
Jan 8, 2013 at 19:49 comment added skratch Fly in my ointment: Mathematica takes the file name to be the full absolute location, ie. C:\\Folder 1\\Folder 2\\FileName(1).csv. Can I get it to ignore the directories and give only the file name by itself? There are numbers in the folders and it throws everything off :/
Jan 8, 2013 at 18:54 comment added skratch Ah yes it's obvious now that the 1 belongs to Flatten[]. Sorry for being lazy. I will want to spend a bit of time playing around with the code.
Jan 8, 2013 at 18:48 comment added image_doctor @skratch The last 1 in the code block is a parameter to Flatten, the level to flatten the data to, as in Flatten[data,1]. This controls how the final list of index pairs are presented. The code that generates the j part of the index is Range@Length@rs You can replace this with any list of unique numbers of the same length as the number of runs in your filename numbers. You might want to try running the sub-parts of the makeIndices function, outside of the function, to see what they do.
Jan 8, 2013 at 18:22 comment added skratch This place is full of wizards. I think this is exactly what I want. I will give it a shot soon. One question for now: I will be working with groups of files from various folders, and as such I would like to control what number "j" (NewNamej(k).csv) starts at. Is that the very last "1" in the block of code containing makeIndices?
Jan 8, 2013 at 18:13 history edited image_doctor CC BY-SA 3.0
added 51 characters in body
Jan 8, 2013 at 17:50 history edited image_doctor CC BY-SA 3.0
added 62 characters in body
Jan 8, 2013 at 17:43 history edited image_doctor CC BY-SA 3.0
added 350 characters in body
Jan 8, 2013 at 17:38 history answered image_doctor CC BY-SA 3.0