I have a string that looks like this (the text is actually much longer):
".296.294.255.268.313.278.311.270.290.305.322.252.276.286.301.305.264.301.251.269.274.311.304.
230.280.264.327.301.301.265.287.285.306.265.282.319.235.262.278.249.239.284.237.249.289.250.
282.240.256.287.303.310.314.242.302.289.268.315.264.293.261.298.310.242.253.299.278.272.333.
272.295.306.276.317.286.250.272.272.274.282.308.262.285.326.321.285.270.270.241.283.305.319.
246.263.311.299.295.315.263.304.279.286.286.299.282.285.289.298.277.292.296.282.267.245.304.
322.252.265.313.288.310.281.272.266.243.285.309.295.269.295.308.275.316.267.283.311.300.252."
I need to transform it into X lists, each containing 3 numbers. Example:
List1 <- c(296, 294, 255)
List2 <- c(268, 313, 278)
etc.
I tried to split by delimiter with strsplit(split = "\.") but that gives me 1) break lines that I cannot eliminate and 2) I don't seem to be able to convert the values into numbers.
Any suggestions?