Julia arrays support indexing with multiple ranges, such as
dat = Array(1:10) # trying to get dat[[1:3, 6:8]] to result in dat[[1,2,3,6,7,8]]
Looking for something that looks like the equivalent of R dat[c(1:3, 6:8)] ?
dat[c(1:3, 6:8)]
The direct equivalent of version R is
v = 1:10 v[ [1:3; 6:8] ]
since ; - concatenation operator:
;
julia> [1:3; 6:8] 6-element Array{Int64,1}: 1 2 3 6 7 8
You can also see chain in Iterators.jl package: https://github.com/JuliaLang/Iterators.jl
chain
Source: https://habr.com/ru/post/1258639/More articles:https://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1258634/comparing-and-adding-items-to-array-of-objects&usg=ALkJrhjav__CsLdW8f8M_x5xiujTkLqBMQGtk Move window out of bounds - c ++Set component details dynamically - reactjsHow to set CSS content property using Google Material icon? - cssHow to connect to a Unix Domain Socket in .NET Core in C # - c #SendGrid - send to multiple addresses by using cURL? - phpGetting php data from a database using jquery without ajax - javascriptSQL Server 2016 express installation error: attempt to perform an unauthorized operation - sql-serverMinimize Flexbox mystery - htmljquery send data to php without ajax - jqueryAll Articles