Hi All,
I am having a tough time figuring out how to split a column and only use the second value from the split in R I would have used gsub:
maindf$pcc = gsub(".*-","", maindf$pcc)
Which is just splitting something like 1P-XXX into “1P” and “XXX” and then taking only the “XXX” and replacing the column with that value.
With Julia I found Strings.jl:
maindf = @chain rawdf begin
@transform(:pcc = split.(:pcc, "-"))
end
Which produces an element Vector{Vector{SubString{String}}} with [“1P”, “XXX”]
what do I need to add to split and then only take the the “XXX” part of this?