[R] Structuring Inventory in R
jdnewm|| @end|ng |rom dcn@d@v|@@c@@u@
Wed Aug 28 16:34:09 CEST 2019
Why do you need to do this? It sounds like homework. Using multiple columns as lookup keys is the normal way this is handled.
On August 28, 2019 7:10:34 AM PDT, Alex Naverniak <stopro888 using gmail.com> wrote:
>The problem is that I need multiple same size data structures for each
>name. For example: Unique item name -"Table" has several (Lets say 5)
>subitems of 3 items in each("Size", "Price", "Qty"); Another item
>has 4 subitems of the same structure (3 positions in each), etc. That
>of furniture unique items may have indefinite number of triple
>need to hace access to each position of subitem like [][][]. I
>also need to dynamically add subitems and furniture items. The total
>of furniture inventory is not known at the beginning. I hope it makes
>sense. Thank you.
>On Wed, Aug 28, 2019 at 2:18 AM Jeff Newmiller
><jdnewmil using dcn.davis.ca.us>
>> dta <- data.frame( SKU=c("4950","8488","1159"),
>> Lists are not as easy to optimize performance with as tables are...
>> you have a specific reason to use them I would minimize your use of
>> single-element items in lists.
>> On August 27, 2019 9:49:28 PM PDT, Jim Lemon <drjimlemon using gmail.com>
>> >Hi Alex,
>> >At a guess you may want something like this:
>> >This produces a data frame with one row. You will probably want many
>> >more rows.
>> >On Wed, Aug 28, 2019 at 2:21 PM Alex Naverniak <stopro888 using gmail.com>
>> >> Hi,
>> >> I am trying to create Inventory structure with item SKU and 3
>> >subitems like
>> >> "Price"; "Qty"; "ID". I tried
>> >list(SKU,list("Item1","Item2","Item3")). It
>> >> seem not to work. Please help with ideas. Thanks.
>> >> Alex
>> >> [[alternative HTML version deleted]]
>> >> ______________________________________________
>> >> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> >> https://stat.ethz.ch/mailman/listinfo/r-help
>> >> PLEASE do read the posting guide
>> >> and provide commented, minimal, self-contained, reproducible code.
>> >R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> >PLEASE do read the posting guide
>> >and provide commented, minimal, self-contained, reproducible code.
>> Sent from my phone. Please excuse my brevity.
Sent from my phone. Please excuse my brevity.
More information about the R-help