I really love to code. To me, it's like the virtual version of Lego Technic - hence the image reference ;-)

I started out with R, so that's kind of like my "first love" language. But I'm finding myself looking more and more into web dev stuff, python and technologies that have something to do with data analysis/science and/or the cloud.

8h
accepted Simple and efficient way to select non-NA data range in data frames
8h
comment Simple and efficient way to select non-NA data range in data frames
@alistaire: neat! Almost twice as fast as mine and very compact. Thanks a lot! Wanna provide this as an answer?
8h
revised Simple and efficient way to select non-NA data range in data frames
added 550 characters in body
8h
revised Simple and efficient way to select non-NA data range in data frames
deleted 22 characters in body
9h
asked Simple and efficient way to select non-NA data range in data frames
10h
comment Reading horizontal (row-based) data from xlsx files into R data frames
You can simplify things a little bit more by dft <- as.data.frame(t(df[-1]), stringsAsFactors = FALSE) and then dft <- as.list(dft) instead of the call to lapply()
10h
answered Transposing a data frame while preserving class/data type information
10h
awarded Custodian
10h
comment Reading horizontal (row-based) data from xlsx files into R data frames
Thanks a lot for the effort! I think we found a great way based on type.convert - really a neat little helper function!
10h
reviewed Approve suggested edit on Reading horizontal (row-based) data from xlsx files into R data frames
10h
accepted Reading horizontal (row-based) data from xlsx files into R data frames
10h
comment Reading horizontal (row-based) data from xlsx files into R data frames
You are awesome! type.convert was exactly the missing puzzle piece! Never heard of it before, thank you so much!!
10h
revised Reading horizontal (row-based) data from xlsx files into R data frames
deleted 41 characters in body
10h
comment Reading horizontal (row-based) data from xlsx files into R data frames
Thanks for taking the time. The problem is reading/capturing the underlying class information of the variables when they are row-based instead of column-based: var_1 should end up being numeric, var_2 can remain character and var_3 needs to be logical in the end. That's exactly the tricky part.
10h
comment Reading horizontal (row-based) data from xlsx files into R data frames
I also think you have an old version of the example file, sorry for that! I've updated it about 20 minutes ago.
10h
comment Reading horizontal (row-based) data from xlsx files into R data frames
Sorry, I forgot to stress the point that the underlying class/data type information needs to be captured: values "TRUE" and "FALSE" should be logicals, the numeric values should be numerics.
11h
revised Reading horizontal (row-based) data from xlsx files into R data frames
added 113 characters in body
11h
revised Transposing a data frame while preserving class/data type information
edited tags
11h
comment Transposing a data frame while preserving class/data type information
@BrandonBertelsen: sorry, I had it wrong at the first go, now the data in the example file is correct: the first sheet demonstrates the "typical" vertical orientation while the second sheet features the horizontal orientation that I often have to deal with
11h
revised Reading horizontal (row-based) data from xlsx files into R data frames
edited title
1 2 3 4 5