Re: [R] JSON to Dataframe

2016-10-18 Thread Bob Rudis
If those are in "ndjson" files or are indeed single records, `ndjson` functions will be a few orders of magnitude faster and will produce perfectly "flat" data frames. It's not intended to be a replacement for `jsonlite` (a.k.a. the quintessential JSON pkg for R) but it's tailor made for making

Re: [R] JSON to Dataframe

2016-10-18 Thread K. Elo
Hi! 18.10.2016, 14:38, Abhinaba Roy wrote: Hi R helpers, I have json inputs from an app which I want to convert to dataframes. Below are the two inputs. Can someone help me in converting these to dataframes [...] IMHO, the best way is to use the package 'jsonlite', see: *

Re: [R] Merge data by coordinates

2016-10-18 Thread Michal Kubista
Dear Milu, If your objective is to match the places from one table to the nearest place in the second table, you can generally use knn algorithm for 1 nearest neighbourhood. But please, check what David suggests first. Best regards, Michal 2016-10-16 19:24 GMT+02:00 David Winsemius

[R] JSON to Dataframe

2016-10-18 Thread Abhinaba Roy
Hi R helpers, I have json inputs from an app which I want to convert to dataframes. Below are the two inputs. Can someone help me in converting these to dataframes *Input1*

[R] tar()/untar() argument symmetry

2016-10-18 Thread Roebuck,Paul L
Any reason untar() has an "exdir" argument (the equivalent of "tar -C"), but tar() does not? The information contained in this e-mail message may be privileged, confidential, and/or protected from disclosure. This e-mail message may contain protected health information (PHI); dissemination of

Re: [R] Difficulties with setting working directory

2016-10-18 Thread Roebuck,Paul L
On 10/14/16, 1:52 PM, "R-help on behalf of Anže Dejak" wrote: >So, the thing with my version of R (I'm using RStudio for R x64 3.3.0 in, >currently, Windows 7) is, that I'm able to set the working directory >temporary (through using setwd() function), but once I try to set it >permanently

[R] MDS, line of best fit, and id of variables

2016-10-18 Thread Kirsten Green
Hi, I have created a dataset that includes 28 rows (burials) and 27 columns (variables) that are coded binomially. I have gotten metaMDS to run in the pst but now can't seem to get it run at all. Error message: > mortdata.mds <- metaMDS(mortdata) Error in FUN(X[[i]], ...) : only defined on a

Re: [R] tar()/untar() argument symmetry

2016-10-18 Thread Duncan Murdoch
On 18/10/2016 12:38 PM, Roebuck,Paul L wrote: Any reason untar() has an "exdir" argument (the equivalent of "tar -C"), but tar() does not? Because you can specify the source directory in the files argument using list.files(). There's no need to duplicate that in tar(). Duncan Murdoch

Re: [R] tar()/untar() argument symmetry

2016-10-18 Thread Roebuck,Paul L
On 10/18/16, 12:52 PM, "Duncan Murdoch" wrote: >On 18/10/2016 12:38 PM, Roebuck,Paul L wrote: >> Any reason untar() has an "exdir" argument (the equivalent of "tar -C"), >> but tar() does not? > >Because you can specify the source directory in the files argument using

Re: [R] MDS, line of best fit, and id of variables

2016-10-18 Thread David L Carlson
What do you get with str(mortdata)? The error message indicates that at least one of the variables is not numeric and the second suggests it is a factor. You said the values were coded binomially, but they must be numeric, e.g. 0, 1 and not "Present" "Absent" or something like that. If they are

Re: [R] MDS, line of best fit, and id of variables

2016-10-18 Thread David L Carlson
You do not need to change it to numeric if it is integer. But if you want to change it, you need to follow the example I included and use sapply(). Here is my effort to replicate your error. Since I'm using random data, it fails to converge, but I do not get the error message you are getting.

Re: [R] MDS, line of best fit, and id of variables

2016-10-18 Thread Kirsten Green
David, I have run the str() function and all my data is int (integer). So I am trying to change it to numeric using: str(mortdata) class(mortdata) is.numeric(mortdata) mortdata.num <- as.numeric(data.frame(mortdata)) But I keep getting an error: > mortdata.num <- as.numeric(data.frame(

Re: [R] MDS, line of best fit, and id of variables

2016-10-18 Thread Bert Gunter
You need to spend time with an R tutorial or two. Your error is due to ignorance of basic R data structures. Bert On Oct 18, 2016 10:48 PM, "Kirsten Green" wrote: > David, > > I have run the str() function and all my data is int (integer). So I am > trying to change it to

[R] install R in relative path

2016-10-18 Thread Tom Graves via R-help
Hello everyone, I am trying to figure out if I can install R in a relative path?  The reason I need to do this is to send R along to a Hadoop cluster so that I can use sparkR with the R version I shipped. The Hadoop cluster doesn't have R installed and the admin won't install it.  I tried a few