Data Deleted When I Open my Data TableHi,
Whenever I open my data table using JSL, the first row (except for the first cell) is deleted and replaced with dots. I was just wondering why as when I open it manually it seems to work fine. Any suggestions would be appreciated.
Re: Data Deleted When I Open my Data TableJMP data table columns can either be numeric or character. Individual rows can not be set.
Re: Data Deleted When I Open my Data TableOkay, that's fine thanks. My data table appears fine when I use JSL to mainpulate the import. After I import the table however, I change the columns to numeric and continuous so in te end result, the row is missing again. That's why I asked for a way to set he data type of a row (so that I could set it to character and the row would appear again.
Re: Data Deleted When I Open my Data TableYour data does start on row 3. That is clearly indicated in the data table image you show. The column name "Date" has been read in from row 1 of your csv file, and then your data is being read in starting on row 2. The value on row 2 of your csv file has the value of "Date". Therefore JMP is finding a non numeric value and it then sets the column to be a Character data type. What you need to do, is to use the data previewer when opening the file, and go through the wizard and select the start of the data being on line 3. You can also specify the data to be forced to be numeric or character. To go to the Preview, when you select the file, you will see that in the lower left of the window, there is a list of checks that you can do, select the "Data with Preview".
If you do this once, and then edit the "Source" entry in the data table, you will see the JSL you can use to read in the data table from a script.
If you still need to change the data type in JSL, the code is
:date << data type(numeric);
This is documented in either the Scripting Guide
Help==>Books==>Scripting Guide
or in the Scripting Index
Help==>Scripting Index
Re: Data Deleted When I Open my Data TableI think I know now what was going wrong. At the end of my script I set the columns to numeric and nominal, which is why the character values probably get replaced (I'm still not sure why the Date wasn't replaced though.) Is there a way to specify the data type of a row in JSL?
Re: Data Deleted When I Open my Data TableAlso the file is a .csv file, not an excel file as I previously, wrongly mentioned.
Re: Data Deleted When I Open my Data TableI thought that that may be the issue but it doesn't work. In jmp, when the excel file is converted into a data table, the first row is used as a column heading...
Re: Data Deleted When I Open my Data TableYour data starts on row 3, not row 2. So you need to change that, and your data should read in correctly.
Re: Data Deleted When I Open my Data TableSo, the above is an example of the excel file which I open in JMP using JSL. When I open it using my script, it turns the second row (all cells after date) to dots. I think it may be to do with how it's imported. Do I need to specify how to open the table in my script, e.g. using best guess etc.? Also, in my script I specified that the data starts on row 2, I'm thinking that might have something to do with it? As a sidenote, this isn't the excel file I originally tested on, but an example of it. The columns would otherwise be filled with data.
Re: Data Deleted When I Open my Data Table
Re: Data Deleted When I Open my Data TableYou really need to provide the data table, and the script you are using.......there are just so many items that can be in the data table, it is impossible to even guess at what is going on.