Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
Choose Language Hide Translation Bar
Level III

Saving tables created within a project in a pre-specified location



I'm trying to put together a script which start with having the user pick a directory in which a project will be created and all the table that are created within the project during the execution of the script are also saved. Creating  and saving the project works fine. However, I run into issues with saving the data table in the same folder as the project file.


Any suggestion would be greatly appreciated.






direct = New Window( "Select a directory to save your project",
								Panel Box( "Select a directory to save your project",
									Lineup Box( N Col( 1 ), spacing( 10 ),
										Text Box( "All the results will be organized into a project. Where do you want to save it?" ),
										Button Box( "Pick a directory",
											dir = Pick Directory( "select a directory", show files( 1 ) );
											direct << close window;

							Show( dir );
							transout = Create Directory( dir || "project_test" );
project = New Project();
	pjname = dir || "project_test/project_test.jmpprj";
							Show( "pjname" );
							project << save as( pjname );
							project<<run script(
								dt = New Table( "Little Class",
	Add Rows( 3 ),
	New Column( "name",
		Set Values( {"KATIE", "LOUISE", "JANE"} )
	New Column( "height",
		Set Values( [59, 61, 55] )
dt<<save as (dir || "project_test/little.jmp")
Article Labels