-3

I asked before, but didn't get an answer I could understand.

I am using Manipulate[Select[ on a dataset, and need to use the results. One cannot simply copy/paste these results.

Any guidance appreciated.

nkormanik
  • 309
  • 3
  • 8
  • Was Kuba's comment not a sufficient answer this question? Use Manipulate[ result = Select[ ... ], ... ], then you can use result later in your notebook. The value of result will get updated whenever you change the Manipulate controls. – jjc385 Jun 20 '17 at 01:18
  • I tried Kuba's "add var = Select[...." the only place where it seemed to make sense: " result = Manipulate[Select[dataset " and that didn't work. I didn't try the clearer approach you show above. Will try it. Thank you. – nkormanik Jun 20 '17 at 08:10
  • Then not sure how one would use "result" to then subsequently show the spreadsheet, as the "Paste Snapshot" approach does. – nkormanik Jun 20 '17 at 08:14
  • What if you just evaluate result in a subsequent cell? It should show the dataset, similarly to the display inside Manipulate at the very bottom of the screenshot in your original question. If all you need is to use the result of `Manipulate', this should be much easier (and more robust, if you change things later) than copying and pasting. – jjc385 Jun 20 '17 at 15:11
  • Not sure how one could evaluate result. What would be the code for that? result = what? – nkormanik Jun 21 '17 at 06:59
  • Just type result in a new cell (all by itself) and evaluate (Shift+Enter). The output will be your displayed dataset. Since result is a variable with a value, evaluating result by itself will simply display that value. – jjc385 Jun 21 '17 at 16:33
  • Phew. That works. Easier than using "Paste Snapshot" from tiny icon at far, far right. Thank you! – nkormanik Jun 21 '17 at 23:21
  • Next question becomes, how to transfer result to another program, such as Excel. Manipulate seems oriented mostly for graphics. Transferring graphics has several examples on these forums. But case at hand is transferring the table, or spreadsheet. Only way I have found so far is to highlight cell, and copy as Plain Text. If there is another way, hope to hear about it. – nkormanik Jun 21 '17 at 23:25

1 Answers1

0

To get access to results of Manipulate for subsequent use....

Click on far right-hand tiny icon in output. "Paste Snapshot."

This pastes the 'Snapshot' into subsequent cell.

Then Evaluate that new cell.

Result is copyable. Highlight cell, right border. Copy as text. (Unfortunately some additional junk, several lines, gets copied as well, and must be deleted from wherever you copy to.)

Example In[ ] after Paste Snapshot:

DynamicModule[{c01 = 2, c02 = 80, c03 = 80, c04 = 80, c05 = 80, 
  c06 = 80, c07 = 80, c08 = 80, c09 = 80}, 
 Select[dataset, #"r_Number" > c01 && #"r_Sen_Slope_5050x_3" > 
     c02 && #"r_Sen_Slope_5050x_5" > c03 && #"r_Mean_50503" > 
     c04 && #"r_Mean_50505" > c05 && #"r_Sen_Slope_5040x_3" > 
     c06 && #"r_Sen_Slope_5040x_5" > c07 && #"r_Mean_50403" > 
     c08 && #"r_Mean_50405" > c09 &]]

Then Evaluate this cell.

There might be other ways to achieve copyable results. If so please chime in here....

nkormanik
  • 309
  • 3
  • 8