I was just wondering if there was away to merge two rows from the same data table using JSL? I was contemplating using the Join function but I'm not entirely sure how that will work.
You need to just try it. Interactively join the table to it's self and see the results. If you then open the "Source" entry in the Tables Panel on the left of the data table, you will see the JSL used to join the data table with it'self
I think you need to say more about your intent with merging rows. I've had data sets where there were multiple rows that needed to be "combined" into a single observation. How to do it depended on whether I wanted the average or sum (or....) of those rows. Other times, there are just multiple rows with identical data and I want to eliminate the multiple observations. So, I think you need to say why there are multiple rows to begin with and what you are attempting to reduce them to single rows for.
Basically I have two heading rows for each of my columns, the first is the main heading of the column and the second is the sub-heading of the column. I want to combine the heading and subheading rows so that they only take up one row. I'm aware I could do this by accessing values and replacing the contents of the first row and deleting the second but this seems like a very arduous task. I would much rather there be a concise function that could help me?
I'll leave it for someone better at scripting to answer your specific question. But I've only had that particular issue occur when importing data from elsewhere (such as a spreadsheet or text file). If that is the case, it is best solved at the file opening stage - you can change the open setting so that data starts on line 3 and the heading comprises 2 lines rather than 1. It would seem odd to create a data set in JMP where the heading is put on two lines to start with.
Ok, thanks anyway. When I try opening via "Data With Preview" and try to enter the first two line numbers in the "Files contain column names on line: ", the wizard's won't let me enter two. Any suggestions?
What kind of file are you opening? If it is a text file, make sure the radio button says "data with preview" and if it is Excel then make the radio button for the "Always force row 1..." is set to Never.
My question is similar to this one I think.
My table has a column with repeating values but the rows have unique values and I am wondering if it is possible to consolidate the repeating rows in to a single row with new columns. Example below:
Subject Value Subject Value Value2
A 1 A 1 2
A 2 ----> B 3 4
you will be able to do what you want
There are no labels assigned to this post.