RectangularRepeatingElement[elem]
represents a rectangular array of elements of type spec in an interpreter, API or form specification.
RectangularRepeatingElement[elem,{maxrows,maxcolumns}]
represents a rectangular array of elements of maximum size maxrows×maxcolums.
RectangularRepeatingElement[elem,{{minrows,maxrows},{mincolumns,maxcolumns}}]
represents a rectangular array of elements of dimensions between minrows×mincolumns and maxrows×maxcolums.
RectangularRepeatingElement
RectangularRepeatingElement[elem]
represents a rectangular array of elements of type spec in an interpreter, API or form specification.
RectangularRepeatingElement[elem,{maxrows,maxcolumns}]
represents a rectangular array of elements of maximum size maxrows×maxcolums.
RectangularRepeatingElement[elem,{{minrows,maxrows},{mincolumns,maxcolumns}}]
represents a rectangular array of elements of dimensions between minrows×mincolumns and maxrows×maxcolums.
Details
- In the context of Interpreter, spec can be any specification used for Interpreter, including CompoundElement or RepeatingElement.
- In the context of FormObject and FormFunction, spec can be any specification used for forms, including the full association.
Examples
open all close allBasic Examples (3)
Use RectangularRepeatingElement to interpret a matrix of data:
Interpreter[RectangularRepeatingElement["Number"]][{{"1", "2.5", "3.2"}, {"11", "15", "12.2"}}]RectangularRepeatingElement fails on data that is not rectangular:
Interpreter[RectangularRepeatingElement["Number"]][{{"1", "2.5", "3.2"}, {"15", "12.2"}}]Use it in an APIFunction to collect complex data:
api = CloudDeploy @ APIFunction[
"data" -> RectangularRepeatingElement["Integer"],
NullSpace[#data]&,
AllowedCloudParameterExtensions -> {"json"}
]URLExecute[api, {"data__json" -> "[[1, 2], [2, 4]]"}]Scope (2)
The second argument is used to limit the size of the input:
Interpreter[RectangularRepeatingElement["Integer", {2, 1}]][{{"1", "2", "3"}}]Interpreter[RectangularRepeatingElement["Integer", {2, 1}]][{{"1"}, {"2"}}]Limit the minimum size of the array:
Interpreter[RectangularRepeatingElement["Integer", {{2, 100}, {2, 100}}]][{{"1", "2", "3"}}]Interpreter[RectangularRepeatingElement["Integer", {{2, 100}, {2, 100}}]][{{"1", "2"}, {"3", "4"}}]Properties & Relations (3)
RectangularRepeatingElement can be used in conjunction with any interpreter specification:
Interpreter[RectangularRepeatingElement["Integer" | "Country"]][{{"1", "italy"}, {"armenia", "5"}}]Including RepeatingElement:
Interpreter[RectangularRepeatingElement[RepeatingElement["Number"]]][{{{"1", "2", "3"}, {"1"}}, {{"5", "6"}, {"7"}}}]And CompoundElement:
Interpreter[RectangularRepeatingElement[CompoundElement[<|"country" -> "Country", "city" -> "City"|>]]][{{<|"country" -> "angola", "city" -> "lahore"|>, <|"city" -> "bangkok", "country" -> "canada"|>}}]Possible Issues (1)
Constructs like FormFunction and FormPage do not show a special interface for RectangularRepeatingElement:
CloudDeploy[
FormFunction["data" -> RectangularRepeatingElement["Integer"],
NullSpace[#data]&
]]Related Guides
History
Text
Wolfram Research (2017), RectangularRepeatingElement, Wolfram Language function, https://reference.wolfram.com/language/ref/RectangularRepeatingElement.html.
CMS
Wolfram Language. 2017. "RectangularRepeatingElement." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/RectangularRepeatingElement.html.
APA
Wolfram Language. (2017). RectangularRepeatingElement. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RectangularRepeatingElement.html
BibTeX
@misc{reference.wolfram_2026_rectangularrepeatingelement, author="Wolfram Research", title="{RectangularRepeatingElement}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/RectangularRepeatingElement.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_rectangularrepeatingelement, organization={Wolfram Research}, title={RectangularRepeatingElement}, year={2017}, url={https://reference.wolfram.com/language/ref/RectangularRepeatingElement.html}, note=[Accessed: 12-June-2026]}