I have the below R instance of Rs structure. I want to work on a specific field of all rows (as dealing with Matrix). So, I am using R[:].I[:] but it gives an error. Any way to do that?
Base.@kwdef mutable struct Rs
I::Vector{Float64} = [2,2,2]
Dot::Array{Float64, 2} = [0 0 0; 0 0 0; 0 0 0]
end
R = Rs[];
push!(R, Rs());
push!(R, Rs());
julia> R[:].I[:]
ERROR: type Array has no field I
Stacktrace:
[1] getproperty(x::Vector{Rs}, f::Symbol)
@ Base .\Base.jl:33
[2] top-level scope
@ REPL[1]:1