Re: [R] Structuring Inventory in R

2019-08-28 Thread Alex Naverniak
You are right. On Wed, Aug 28, 2019 at 10:34 AM Jeff Newmiller wrote: > 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 > wrote: > >Thank you. > >The problem is

Re: [R] Structuring Inventory in R

2019-08-28 Thread Alex Naverniak
Thank you. The problem is that I need multiple same size data structures for each item name. For example: Unique item name -"Table" has several (Lets say 5) subitems of 3 items in each("Size", "Price", "Qty"); Another item "Chair" has 4 subitems of the same structure (3 positions in each), etc. Tha

Re: [R] Structuring Inventory in R

2019-08-28 Thread Jeff Newmiller
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 wrote: >Thank you. >The problem is that I need multiple same size data structures for each >item >name. For example: Uni

Re: [R] Structuring Inventory in R

2019-08-27 Thread Jeff Newmiller
Perhaps dta <- data.frame( SKU=c("4950","8488","1159"), Price=c(10,15,3),Qty=c(24,144,16),ID=c("10208473","38447769","43759115") ) Lists are not as easy to optimize performance with as tables are... unless you have a specific reason to use them I would minimize your use of single-element items

Re: [R] Structuring Inventory in R

2019-08-27 Thread Jim Lemon
Hi Alex, At a guess you may want something like this: data.frame(item="SKU",price=10,qty=2,ID="1") This produces a data frame with one row. You will probably want many more rows. Jim On Wed, Aug 28, 2019 at 2:21 PM Alex Naverniak wrote: > > Hi, > I am trying to create Inventory structure w

[R] Structuring Inventory in R

2019-08-27 Thread Alex Naverniak
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]] ___