{"action":"created","issue":{"url":"https://api.github.com/repos/kaneplusplus/bigmemory/issues/4","labels_url":"https://api.github.com/repos/kaneplusplus/bigmemory/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/kaneplusplus/bigmemory/issues/4/comments","events_url":"https://api.github.com/repos/kaneplusplus/bigmemory/issues/4/events","html_url":"https://github.com/kaneplusplus/bigmemory/issues/4","id":68184074,"number":4,"title":"float type matrices?","user":{"login":"cdeterman","id":3091179,"avatar_url":"https://avatars.githubusercontent.com/u/3091179?v=3","gravatar_id":"","url":"https://api.github.com/users/cdeterman","html_url":"https://github.com/cdeterman","followers_url":"https://api.github.com/users/cdeterman/followers","following_url":"https://api.github.com/users/cdeterman/following{/other_user}","gists_url":"https://api.github.com/users/cdeterman/gists{/gist_id}","starred_url":"https://api.github.com/users/cdeterman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdeterman/subscriptions","organizations_url":"https://api.github.com/users/cdeterman/orgs","repos_url":"https://api.github.com/users/cdeterman/repos","events_url":"https://api.github.com/users/cdeterman/events{/privacy}","received_events_url":"https://api.github.com/users/cdeterman/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-04-13T20:15:38Z","updated_at":"2015-06-02T12:00:34Z","closed_at":"2015-04-20T20:08:39Z","body":"Given the focus of this package is to use the minimal amount of memory as efficiently as possible I believe it should include `big.matrix` objects of type `float`.  There may be situations in which single precision is sufficient and therefore would need only ~half the space as a `double` matrix.  I know R does not have any single precision data type but seeing how all the 'heavy lifting' is done in C++ it seems like this should be an approachable thing.  However I would like to have additional opinions on the following points before I begin writing a bunch of code.\r\n\r\n1. Naturally, do you agree that `float` type matrices should be a part of this package?\r\n2. The current structure has the `matrix_type` representing the byte size of each type.  Continuing this with `float` types would lead a conflict in various `case` statements. The only solution I could come up off the top of my head was to add another field to the `big.matrix` object that is more specific to the data type and not the byte size.  e.g. `pMat->matrix_data_type()` would return a string (i.e. 'int', 'float', 'double', etc).  This would lead to other code requiring updating, such as the [Rcpp Gallery posts](http://gallery.rcpp.org/articles/using-bigmemory-with-rcpp/) unless a more elegant solution can be conceived.\r\n3. Approaches likely would involved the use of `typeid` from `<typeinfo>` unless we would want to also begin moving towards C++11 standards where we could use the newer `decltype` function but possibly a moot point here (but worth beginning thoughts about C++11.\r\n\r\nAny thoughts are appreciated :)"},"comment":{"url":"https://api.github.com/repos/kaneplusplus/bigmemory/issues/comments/107928404","html_url":"https://github.com/kaneplusplus/bigmemory/issues/4#issuecomment-107928404","issue_url":"https://api.github.com/repos/kaneplusplus/bigmemory/issues/4","id":107928404,"user":{"login":"cdeterman","id":3091179,"avatar_url":"https://avatars.githubusercontent.com/u/3091179?v=3","gravatar_id":"","url":"https://api.github.com/users/cdeterman","html_url":"https://github.com/cdeterman","followers_url":"https://api.github.com/users/cdeterman/followers","following_url":"https://api.github.com/users/cdeterman/following{/other_user}","gists_url":"https://api.github.com/users/cdeterman/gists{/gist_id}","starred_url":"https://api.github.com/users/cdeterman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdeterman/subscriptions","organizations_url":"https://api.github.com/users/cdeterman/orgs","repos_url":"https://api.github.com/users/cdeterman/repos","events_url":"https://api.github.com/users/cdeterman/events{/privacy}","received_events_url":"https://api.github.com/users/cdeterman/received_events","type":"User","site_admin":false},"created_at":"2015-06-02T12:00:34Z","updated_at":"2015-06-02T12:00:34Z","body":"@sritchie73 We are currently working on some additional small fixes (see issue #15 and #16 ).  I imagine once we have these issues resolved so R CMD check passes without error we will update it on CRAN.  For now you can use the dev version from this repo.  Did you have any additional thoughts @kaneplusplus ?  "}}