I am currently struggling with an issue for which I cannot find a concrete answer within the community. I am currently working with a dataset, where I got Indetermiante values. I droped these by using the following code:
data2= data/. Indeterminate -> ""
Now I have the problem that my data look like this: 0.145596, 0.123875, 0.066587,,,,, 0.102394, -0.418984, -0.422966, -0.50856, -0.161867,,, -0.470506, -0.463086, 0.349094, 0.633164
However, I would get rid of all Indeterminate values or better, get rid of the commas, somehow just getting the values of the list. Can someone please help me and tell me how to flatten the data (delete the missings)?
Dear all, sorry to bother you. I found a solution for myself, which was obviously pretty simple. I used the function DeleteCases[data, ""] and solved it. Hence, please disregard my posting.
Just be careful, in general, with “replacing with Sequence[]”. Sequence will not be directly evaluated:
b = {1, 2, 3, 4};
b[[1]] = Sequence[];
b[[1]] = Sequence[];
b[[1]] = Sequence[];
?b
b
This does not result in a list of length 1, but rather length 3. The first element is dropped only once, not thrice. You need intermediate evaluations:
b = {1, 2, 3, 4};
b[[1]] = Sequence[];
b = b;
b[[1]] = Sequence[];
b = b;
b[[1]] = Sequence[];
b = b;
b
Therefore I would strongly advice to use DeleteCases over replacing with Nothing or Sequence. And note that Nothing only works in Lists not in objects with different heads