From ankurshrestha at live.in Sun Apr 2 09:18:35 2017 From: ankurshrestha at live.in (ankur) Date: Sun, 2 Apr 2017 00:18:35 -0700 (PDT) Subject: [datatable-help] Regular Expression on Text Message-ID: <1491117515411-4730906.post@n4.nabble.com> Hi, I need an urgent help on handling below issue format: Format: "00__000" (2 numeric, 3 alphabets, 3 numeric) Text: 2AR22 Results: "02AR__220" Thanks in advance for your help. Ankur K -- View this message in context: http://r.789695.n4.nabble.com/Regular-Expression-on-Text-tp4730906.html Sent from the datatable-help mailing list archive at Nabble.com. From niparisco at gmail.com Sun Apr 2 13:14:44 2017 From: niparisco at gmail.com (Nicolas Paris) Date: Sun, 2 Apr 2017 13:14:44 +0200 Subject: [datatable-help] Regular Expression on Text In-Reply-To: <1491117515411-4730906.post@n4.nabble.com> References: <1491117515411-4730906.post@n4.nabble.com> Message-ID: <20170402111444.GA7471@gmail.com> Hi, This maiy help ? > help <- function(string){paste0(sprintf("%02d", as.numeric(gsub("^(\\d+).*","\\1",string))),substr(paste0(gsub("^(\\d+)([A-z]+).*","\\2",string),"___"),1,4),sprintf("%03d", as.numeric(gsub(".*(\\d+)$","\\1",string))))} > help("02AR22") [1] "02AR__002" But remember, this question in not intended for data.table. Le 02 avril 2017 ? 09:18, ankur ?crivait : > Hi, > > I need an urgent help on handling below issue format: > Format: "00__000" (2 numeric, 3 alphabets, 3 numeric) > Text: 2AR22 > Results: "02AR__220" > > Thanks in advance for your help. > > Ankur K > > > > -- > View this message in context: http://r.789695.n4.nabble.com/Regular-Expression-on-Text-tp4730906.html > Sent from the datatable-help mailing list archive at Nabble.com. > _______________________________________________ > datatable-help mailing list > datatable-help at lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help From ankurshrestha at live.in Mon Apr 3 06:28:12 2017 From: ankurshrestha at live.in (ankur) Date: Sun, 2 Apr 2017 21:28:12 -0700 (PDT) Subject: [datatable-help] Regular Expression on Text In-Reply-To: <20170402111444.GA7471@gmail.com> References: <1491117515411-4730906.post@n4.nabble.com> <20170402111444.GA7471@gmail.com> Message-ID: <1491193692930-4730933.post@n4.nabble.com> Hi natus, many thanks for this but a little tweak is needed: help("02AR22") # is showing below [1] "02AR__002" Where required value is: "02AR__022" Also, please give me a link where I can learn this technique. Regards, Ankur K -- View this message in context: http://r.789695.n4.nabble.com/Regular-Expression-on-Text-tp4730906p4730933.html Sent from the datatable-help mailing list archive at Nabble.com. From ankurshrestha at live.in Mon Apr 3 06:42:51 2017 From: ankurshrestha at live.in (ankur) Date: Sun, 2 Apr 2017 21:42:51 -0700 (PDT) Subject: [datatable-help] Regular Expression on Text In-Reply-To: <20170402111444.GA7471@gmail.com> References: <1491117515411-4730906.post@n4.nabble.com> <20170402111444.GA7471@gmail.com> Message-ID: <1491194571816-4730934.post@n4.nabble.com> Thanks natus, I got it. Regards, Ankur K -- View this message in context: http://r.789695.n4.nabble.com/Regular-Expression-on-Text-tp4730906p4730934.html Sent from the datatable-help mailing list archive at Nabble.com. From dangerousfrizbee at gmail.com Mon Apr 3 14:43:20 2017 From: dangerousfrizbee at gmail.com (dangerousfrizbee) Date: Mon, 3 Apr 2017 05:43:20 -0700 (PDT) Subject: [datatable-help] Boxplot of mean, sd, max, min without raw data Message-ID: <1491223400029-4730939.post@n4.nabble.com> I am trying to make a boxplot using already calculated mean, sd, min and max values (I don't have access to the raw data, but I want to convert a table to boxplots). I tried to use the geom_boxplot command in ggplot2 with stat="identity", but it is not working (I think it only works on raw data?) - if I enter my data in a dataframe (df) and then enter the following commands: ggplot(df, aes(x))+ geom_boxplot(aes(ymin = y1, lower = y2, middle = y3, upper = y4, ymax = y5), stat = "identity") I get an empty plot with axis labels (this makes me think it only works on raw data with built in calculations?) Is there a way to do what I want to do? I have uploaded my data file. WCM4.txt thanks! Susan -- View this message in context: http://r.789695.n4.nabble.com/Boxplot-of-mean-sd-max-min-without-raw-data-tp4730939.html Sent from the datatable-help mailing list archive at Nabble.com. From ulrich.spiess at gmx.at Mon Apr 10 15:44:42 2017 From: ulrich.spiess at gmx.at (Lask_Linz) Date: Mon, 10 Apr 2017 06:44:42 -0700 (PDT) Subject: [datatable-help] Data shape from wide to long Message-ID: <1491831882223-4731342.post@n4.nabble.com> I have 9 different daily variables (share price, bid price, ask price, shares outstanding, etc...) for appr. 900 companies over 2 years. In the first column is the date, and then the following 9 columns are the 9 variables for the first firm (price1, bid price1, ask price1,...), followed by the variables for the 2nd firm (price2, bid price2, ask price2,...) etc... I want to shape the data into the long format with the first column as the date, second column as the firm number and then the 9 variables. I have already tried it with the gather() function and have 4 columns now with the date, firm number, variable and the value. But I don?t know how to shape it that I get the 9 variables into 9 columns? Thanks a lot for any help. -- View this message in context: http://r.789695.n4.nabble.com/Data-shape-from-wide-to-long-tp4731342.html Sent from the datatable-help mailing list archive at Nabble.com. From serdar.akin at paylevo.com Mon Apr 10 16:39:14 2017 From: serdar.akin at paylevo.com (Serdar Akin) Date: Mon, 10 Apr 2017 16:39:14 +0200 Subject: [datatable-help] Data shape from wide to long In-Reply-To: <1491831882223-4731342.post@n4.nabble.com> References: <1491831882223-4731342.post@n4.nabble.com> Message-ID: <4f123106-ec6a-c948-8d10-aaf8bcd7060c@paylevo.com> maybe you are looking for melt.data.table(data, id.vars = c('data','firm')) Den 10/04/17 kl. 15:44, skrev Lask_Linz: > long format From nfields at gmail.com Wed Apr 12 22:49:03 2017 From: nfields at gmail.com (affableambler) Date: Wed, 12 Apr 2017 13:49:03 -0700 (PDT) Subject: [datatable-help] Boxplot of mean, sd, max, min without raw data In-Reply-To: <1491223400029-4730939.post@n4.nabble.com> References: <1491223400029-4730939.post@n4.nabble.com> Message-ID: <1492030143869-4731631.post@n4.nabble.com> Do you want a separate box plot for each row? If so, try this: library(ggplot2) #Read in the data: data<-read.table('E:\\Libraries\\Documents\\WCM4.txt',sep='\t',header=T,stringsAsFactors = F) #Remove column of row numbers data$x<-NULL #Run a for loop to create separate boxplots for the data in each row: for(row in 1:ncol(data)){boxplot(as.numeric(as.vector(data[row,])))} Feel free to adjust the parameters of boxplot() as needed. -- View this message in context: http://r.789695.n4.nabble.com/Boxplot-of-mean-sd-max-min-without-raw-data-tp4730939p4731631.html Sent from the datatable-help mailing list archive at Nabble.com. From thierrylondi817 at gmail.com Thu Apr 13 03:46:17 2017 From: thierrylondi817 at gmail.com (thierry12) Date: Wed, 12 Apr 2017 18:46:17 -0700 (PDT) Subject: [datatable-help] Buy real and fake passports, drivers license, ID cards, birth certificates, Visas, SSN, divorce papers, US Message-ID: <1492047977037-4731646.post@n4.nabble.com> Buy counterfeit,real fake passport, drivers license, id card(thierrylondi817 at gmail.com OBTAIN OR BUY HIGH QUALITY FAKE PASSPORT, ID CARDS , DRIVERS LICENSE We offer only original high-quality fake passports, driver's licenses, identity cards, visas, birth certificates and other products for a number of countries like: USA, Australia, Belgium, Brazil, Canada, Finland, France, Germany, Israel, Mexico, Netherlands, South Africa, Spain, United Kingdom, etc. To get the additional information and place the order just visit our website: (If in some technical reasons you are unable to visit our website we are always happy to answer your questions on email addresses mentioned below) Contact e-mails: thierrylondi817 at gmail.com General support: thierrylondi817 at gmail.com Technical support:thierrylondi817 at gmail.com BUY HIGH QUALITY COUNTERFEITS BILLS EUROS POUNDS DOLLERS PASSPORT, ID CARDS , DRIVERS LICENSE BUY HIGH QUALITY REAL/FAKE PASSPORTS,DRIVERS LICENSE,ID CARDS,Counterfeits Bank notes Etc Buy Real/Fake Passports,Driver?s License,ID Cards,Visas, USA Green Card,Citizenship -- View this message in context: http://r.789695.n4.nabble.com/Buy-real-and-fake-passports-drivers-license-ID-cards-birth-certificates-Visas-SSN-divorce-papers-US-tp4731646.html Sent from the datatable-help mailing list archive at Nabble.com. From dangerousfrizbee at gmail.com Thu Apr 13 08:04:23 2017 From: dangerousfrizbee at gmail.com (dangerousfrizbee) Date: Wed, 12 Apr 2017 23:04:23 -0700 (PDT) Subject: [datatable-help] Boxplot of mean, sd, max, min without raw data In-Reply-To: <1492030143869-4731631.post@n4.nabble.com> References: <1491223400029-4730939.post@n4.nabble.com> <1492030143869-4731631.post@n4.nabble.com> Message-ID: thanks, that does work, but I actually want to plot all of the data in one plot, labelled 1-14 along the x axis. any further suggestions would be much appreciated! On 12 April 2017 at 22:49, affableambler [via R] < ml-node+s789695n4731631h21 at n4.nabble.com> wrote: > Do you want a separate box plot for each row? If so, try this: > > library(ggplot2) > > #Read in the data: > data<-read.table('E:\\Libraries\\Documents\\WCM4.txt',sep='\t',header=T,stringsAsFactors > = F) > > #Remove column of row numbers > data$x<-NULL > > #Run a for loop to create separate boxplots for the data in each row: > for(row in 1:ncol(data)){boxplot(as.numeric(as.vector(data[row,])))} > > Feel free to adjust the parameters of boxplot() as needed. > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > http://r.789695.n4.nabble.com/Boxplot-of-mean-sd-max-min-without-raw-data- > tp4730939p4731631.html > To unsubscribe from Boxplot of mean, sd, max, min without raw data, click > here > > . > NAML > > -- View this message in context: http://r.789695.n4.nabble.com/Boxplot-of-mean-sd-max-min-without-raw-data-tp4730939p4731794.html Sent from the datatable-help mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nfields at gmail.com Thu Apr 13 23:19:04 2017 From: nfields at gmail.com (affableambler) Date: Thu, 13 Apr 2017 14:19:04 -0700 (PDT) Subject: [datatable-help] Boxplot of mean, sd, max, min without raw data In-Reply-To: References: <1491223400029-4730939.post@n4.nabble.com> <1492030143869-4731631.post@n4.nabble.com> Message-ID: <1492118344602-4732123.post@n4.nabble.com> Sorry for not getting back to you sooner. In that case, you can use par() before the loop to combine multiple plots into one view: data<-read.table('E:\\Libraries\\Documents\\WCM4.txt',sep='\t',header=T,stringsAsFactors = F) #Remove column of row numbers data$x<-NULL #Run a for loop to create separate boxplots for the data in each row: par(mfrow=c(1,nrow(data))) for(row in 1:nrow(data)){boxplot(as.numeric(as.vector(data[row,])),main=row)} The mfrow parameter takes a vector of two integers. The first is the number of rows in the view and the second is the number of columns, so the code above gives you one row with fourteen plots. If you want to divide it into two rows, just change it to c(2,nrow(data)/2), etc. -- View this message in context: http://r.789695.n4.nabble.com/Boxplot-of-mean-sd-max-min-without-raw-data-tp4730939p4732123.html Sent from the datatable-help mailing list archive at Nabble.com. From dbrady at pobox.com Sat Apr 15 05:19:32 2017 From: dbrady at pobox.com (Don Brady) Date: Fri, 14 Apr 2017 23:19:32 -0400 Subject: [datatable-help] Using data.table code in an interactive desktop application written in C# or Java Message-ID: <009f5dc1-0a78-b46b-d205-8b8420f874cc@pobox.com> I have written a largish R data.table application for back-testing option trading strategies. It involves large quantities of option price data, all of which is stored in data.tables. As an R application, it works fast and well, thanks to the strengths of data.table. There are about 10,000 lines of R code, almost all of which are calling data.table functions. However, I want to take some of the code and create a snappy desktop GUI application for quick interactive option portfolio and trade evaluation. Ordinarily I would do this in Java or C#. However, since the prior code is all written using data.table calls, it would be ideal if I could continue to use.table. I tried Shiny and I got a shiny app. written and working, that includes lots of use of data.table and my existing tables. However, it is too slow. I need lightning fast for the GUI which is to be exploratory. So, after this background, my question is, is there any way to call data.table from a C# or Java desktop GUI app. without involving R? Assuming the answer is No, what would be another in-memory database implementation that can be called from C# or Java, that would be similar enough to data.table that I would be able to migrate over my data.table code over. It is obviously no problem to convert over the data, since that is just columns. But my concern is to minimize the effort in converting over the code, which is now, of course, full of data-table joins, merges, selects, renames, updates etc., all currently written in data.table's very unique syntax (currently coded in R function calls). Is there some in-memory database package that would support a similar syntax to facilitate converting the code from data.table? Thank you very much, I should add, for the wonderful data.table package! I certainly will not abandon it. I am just looking for something somewhat compatible with its style, for a limited special purpose. Don -------------- next part -------------- An HTML attachment was scrubbed... URL: From santosh.srinivas at gmail.com Sat Apr 15 06:28:58 2017 From: santosh.srinivas at gmail.com (Santosh Srinivas) Date: Sat, 15 Apr 2017 09:58:58 +0530 Subject: [datatable-help] Using data.table code in an interactive desktop application written in C# or Java In-Reply-To: <009f5dc1-0a78-b46b-d205-8b8420f874cc@pobox.com> References: <009f5dc1-0a78-b46b-d205-8b8420f874cc@pobox.com> Message-ID: Hi Don, I'm not sure if this will meet your performance expectations from the GUI. But, I am creating my GUI using HTML 5 stuff on Electron ( https://github.com/electron/electron) which fires off calls to my OpenCPU ( https://www.opencpu.org/) service that does most of backend R related work. I'm guessing that you could run Java applets using a similar setup. Thank you. Santosh On Sat, Apr 15, 2017 at 8:49 AM, Don Brady wrote: > I have written a largish R data.table application for back-testing option > trading strategies. It involves large quantities of option price data, > all of which is stored in data.tables. As an R application, it works fast > and well, thanks to the strengths of data.table. There are about 10,000 > lines of R code, almost all of which are calling data.table functions. > > However, I want to take some of the code and create a snappy desktop GUI > application for quick interactive option portfolio and trade evaluation. > Ordinarily I would do this in Java or C#. However, since the prior code is > all written using data.table calls, it would be ideal if I could continue > to use.table. > > I tried Shiny and I got a shiny app. written and working, that includes > lots of use of data.table and my existing tables. However, it is too > slow. I need lightning fast for the GUI which is to be exploratory. > > So, after this background, my question is, is there any way to call > data.table from a C# or Java desktop GUI app. without involving R? > Assuming the answer is No, what would be another in-memory database > implementation that can be called from C# or Java, that would be similar > enough to data.table that I would be able to migrate over my data.table > code over. It is obviously no problem to convert over the data, since > that is just columns. But my concern is to minimize the effort in > converting over the code, which is now, of course, full of data-table > joins, merges, selects, renames, updates etc., all currently written in > data.table's very unique syntax (currently coded in R function calls). Is > there some in-memory database package that would support a similar syntax > to facilitate converting the code from data.table? > > Thank you very much, I should add, for the wonderful data.table package! > I certainly will not abandon it. I am just looking for something somewhat > compatible with its style, for a limited special purpose. > > Don > > > > _______________________________________________ > datatable-help mailing list > datatable-help at lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/ > listinfo/datatable-help > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mel at mbacou.com Sun Apr 16 02:11:26 2017 From: mel at mbacou.com (Melanie Bacou) Date: Sat, 15 Apr 2017 20:11:26 -0400 Subject: [datatable-help] Using data.table code in an interactive desktop application written in C# or Java In-Reply-To: References: <009f5dc1-0a78-b46b-d205-8b8420f874cc@pobox.com> Message-ID: Don, In addition to Santosh's suggestion below, you could also read about these 2: - Rserve, a TCP/IP server that's often used to connect applications to local R processes (e.g. Tableau uses Rserve). I've had good results with Rserve in the past in a use-case similar to yours. I would just open a socket to a running Rserve session preloaded with my custom R packages and return only slices of data back to a web GUI. - rJava (an R interface for Java) used for example in the StatET Java-based IDE for R Both options would allow you to keep your core data and business logic in your current R package. --Mel. On 04/15/2017 12:28 AM, Santosh Srinivas wrote: > Hi Don, > > I'm not sure if this will meet your performance expectations from the GUI. > > But, I am creating my GUI using HTML 5 stuff on Electron > (https://github.com/electron/electron) which fires off calls to my > OpenCPU (https://www.opencpu.org/) service that does most of backend > R related work. > > I'm guessing that you could run Java applets using a similar setup. > > Thank you. > Santosh > > > On Sat, Apr 15, 2017 at 8:49 AM, Don Brady > wrote: > > I have written a largish R data.table application for back-testing > option trading strategies. It involves large quantities of > option price data, all of which is stored in data.tables. As an R > application, it works fast and well, thanks to the strengths of > data.table. There are about 10,000 lines of R code, almost all of > which are calling data.table functions. > > However, I want to take some of the code and create a snappy > desktop GUI application for quick interactive option portfolio and > trade evaluation. Ordinarily I would do this in Java or C#. > However, since the prior code is all written using data.table > calls, it would be ideal if I could continue to use.table. > > I tried Shiny and I got a shiny app. written and working, that > includes lots of use of data.table and my existing tables. > However, it is too slow. I need lightning fast for the GUI which > is to be exploratory. > > So, after this background, my question is, is there any way to > call data.table from a C# or Java desktop GUI app. without > involving R? Assuming the answer is No, what would be another > in-memory database implementation that can be called from C# or > Java, that would be similar enough to data.table that I would be > able to migrate over my data.table code over. It is obviously no > problem to convert over the data, since that is just columns. But > my concern is to minimize the effort in converting over the code, > which is now, of course, full of data-table joins, merges, > selects, renames, updates etc., all currently written in > data.table's very unique syntax (currently coded in R function > calls). Is there some in-memory database package that would > support a similar syntax to facilitate converting the code from > data.table? > > Thank you very much, I should add, for the wonderful data.table > package! I certainly will not abandon it. I am just looking for > something somewhat compatible with its style, for a limited > special purpose. > > Don > > > > _______________________________________________ > datatable-help mailing list > datatable-help at lists.r-forge.r-project.org > > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help > > > > > > _______________________________________________ > datatable-help mailing list > datatable-help at lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help From dbrady at pobox.com Sun Apr 16 13:22:24 2017 From: dbrady at pobox.com (Don Brady) Date: Sun, 16 Apr 2017 07:22:24 -0400 Subject: [datatable-help] Using data.table code in an interactive desktop application written in C# or Java In-Reply-To: References: <009f5dc1-0a78-b46b-d205-8b8420f874cc@pobox.com> Message-ID: <38cb0392-ba6e-280e-aceb-cfbbb0c7c89e@pobox.com> Thanks you very much for the comments. Those are some good ways to get he data back and forth. In fact, I think we can regard those mechanical issues as taken care of. I can see a number of ways to do that. However, once I get the columnar data (what was data.tables in R) into C# and stored in memory, what representation of it should I use in C# that would be most like data.table? And how would I manipulate it then and there in C#, but in data.table like ways, without involving R at that point. Does anyone know what .Net way would be most like data.table? Would it be LINQ Objects, for example, or some in-memory data package? I do not want to do SQL etc. which is so painful compared to data.table. I know this is not a data.table question as such, but people here are the only people who can understand it because they know what data.table is. I want to be able to add one column to another etc. as I can do in data.table. (Then maybe eventually send it back to R as a data.table which is just mechanics again). If I am too far off topic let me know and I apologize. Thanks, Don -------------- next part -------------- An HTML attachment was scrubbed... URL: From niparisco at gmail.com Sun Apr 16 16:05:54 2017 From: niparisco at gmail.com (Nicolas Paris) Date: Sun, 16 Apr 2017 16:05:54 +0200 Subject: [datatable-help] Using data.table code in an interactive desktop application written in C# or Java In-Reply-To: <38cb0392-ba6e-280e-aceb-cfbbb0c7c89e@pobox.com> References: <009f5dc1-0a78-b46b-d205-8b8420f874cc@pobox.com> <38cb0392-ba6e-280e-aceb-cfbbb0c7c89e@pobox.com> Message-ID: <20170416140554.GA22669@gmail.com> Hi, When manipulating huge datasets, the bottleneck is certainly not the viz tool (shiny, c#, html5 etc). This won't be data-manipulation part (you won't find faster than data.table with c# manipulation since most part of data.table is C based). The slow part of your tool is probably the data-loading phase. Open-CPU allows to cache data when the opencpu services is starting. This means each user querying your dataset won't have to wait until the dataset is loaded into open-cpu memory. see http://stackoverflow.com/questions/12468574/are-data-objects-persistent-in-opencpus-r-session Rserver and other stuff are quite old comparing to open-cpu. And I would go with them. Keep separate your view (html5, c#), backend (opencpu/R) and database (opencpu/data.table). And one day you can moove to more flexible architecture such backend (java/c#) and database (distributed such hive) if your dataset cannot feet into RAM memory. But the opencpu way allows you to fast deploy something compatible with your 10K lines of data.table/R code Le 16 avril 2017 ? 13:22, Don Brady ?crivait : > Thanks you very much for the comments.? Those are some good ways to get he data > back and forth.? In fact, I think we can regard those mechanical issues as > taken care of.? I can see a number of ways to do that. > > However, once I get the columnar data (what was data.tables in R) into C# and > stored in memory, what representation of it should I use in C# that would be > most like data.table? ? And how would I manipulate it then and there in C#, but > in data.table like ways, without involving R at that point.? Does anyone know > what .Net way would be most like data.table?? Would it be LINQ Objects, for > example, or some in-memory data package? ? I do not want to do SQL etc. which > is so painful compared to data.table.? I know this is not a data.table question > as such, but people here are the only people who can understand it because they > know what data.table is.? I want to be able to add one column to another etc. > as I can do in data.table.? (Then maybe eventually send it back to R as a > data.table which is just mechanics again). > > If I am too far off topic let me know and I apologize. > > Thanks, > > Don > _______________________________________________ > datatable-help mailing list > datatable-help at lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help From dbrady at pobox.com Sun Apr 16 19:56:21 2017 From: dbrady at pobox.com (Don Brady) Date: Sun, 16 Apr 2017 13:56:21 -0400 Subject: [datatable-help] Using data.table code in an interactive desktop application written in C# or Java In-Reply-To: References: <009f5dc1-0a78-b46b-d205-8b8420f874cc@pobox.com> Message-ID: Thanks for the comment involving Open-CPU which is important. Definitely I will at least still base the data.tables and a lot of the code permanently in R's data table.. I have no doubt that R's data.table is far faster than anything else. The problem is in the lack of a high-speed non-web based user interface for a richdesktop app. (other than using a client-server architecture). For highly interactive use, I found Shiny and rhandsontable too sluggish for huge tables. Looking for what is the nearest thing to R's data.table on the .Net platform itself, for those cases where that is needed, F# and Deedle seem to be very attractive possibilities that I am now exploring. http://bluemountaincapital.github.io/Deedle/csharpframe.html http://dacrook.com/battle-of-the-programming-languages/ > Deedle is an easy to use library for data and time series manipulation > and for scientific programming. It supports working with structured > data frames, ordered and unordered data, as well as time series. > Deedle is designed to work well for exploratory programming using F# > and C# interactive console, but can be also used in efficient compiled > .NET code. > > The library implements a wide range of operations for data > manipulation including advanced indexing and slicing, joining and > aligning data, handling of missing values, grouping and aggregation, > statistics and more. > The above feature set sounds very similar to R's data.table! I am sure that data.table is far superior in performance and function to Deedle (partly based on this article: http://www.extremeoptimization.com/Blog/index.php/2014/01/data-frame-library-preview/ ). However, Deedle may be "fast enough" in the subset of cases where I do need to work with directly with data frames in the front-end C# desktop app for interactive speed. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dangerousfrizbee at gmail.com Tue Apr 18 10:23:44 2017 From: dangerousfrizbee at gmail.com (dangerousfrizbee) Date: Tue, 18 Apr 2017 01:23:44 -0700 (PDT) Subject: [datatable-help] Boxplot of mean, sd, max, min without raw data In-Reply-To: <1492118344602-4732123.post@n4.nabble.com> References: <1491223400029-4730939.post@n4.nabble.com> <1492030143869-4731631.post@n4.nabble.com> <1492118344602-4732123.post@n4.nabble.com> Message-ID: Hi, Thanks for your further advice. However, I must not have explained myself very clearly, sorry about that. I want one plot with all of the boxplots in it plotted using the same Y scale so that I can visually compare them to each other. Does that make sense? See attached sketch that will hopefully make it clearer! Sorry again for not being clear from the outset as to what I was trying to do! kind regards, Susan On 13 April 2017 at 23:19, affableambler [via R] < ml-node+s789695n4732123h73 at n4.nabble.com> wrote: > Sorry for not getting back to you sooner. In that case, you can use par() > before the loop to combine multiple plots into one view: > > data<-read.table('E:\\Libraries\\Documents\\WCM4.txt',sep='\t',header=T,stringsAsFactors > = F) > > #Remove column of row numbers > data$x<-NULL > > #Run a for loop to create separate boxplots for the data in each row: > par(mfrow=c(1,nrow(data))) > for(row in 1:nrow(data)){boxplot(as.numeric(as.vector(data[row,])),main=row)} > > > > The mfrow parameter takes a vector of two integers. The first is the > number of rows in the view and the second is the number of columns, so the > code above gives you one row with fourteen plots. If you want to divide it > into two rows, just change it to c(2,nrow(data)/2), etc. > > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > http://r.789695.n4.nabble.com/Boxplot-of-mean-sd-max-min-without-raw-data- > tp4730939p4732123.html > To unsubscribe from Boxplot of mean, sd, max, min without raw data, click > here > > . > NAML > > boxplot.jpg (67K) -- View this message in context: http://r.789695.n4.nabble.com/Boxplot-of-mean-sd-max-min-without-raw-data-tp4730939p4732686.html Sent from the datatable-help mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nfields at gmail.com Tue Apr 18 16:46:57 2017 From: nfields at gmail.com (affableambler) Date: Tue, 18 Apr 2017 07:46:57 -0700 (PDT) Subject: [datatable-help] Boxplot of mean, sd, max, min without raw data In-Reply-To: References: <1491223400029-4730939.post@n4.nabble.com> <1492030143869-4731631.post@n4.nabble.com> <1492118344602-4732123.post@n4.nabble.com> Message-ID: <1492526817441-4732696.post@n4.nabble.com> Hi Susan, This will require reshaping the data: data<-read.table('E:\\Libraries\\Documents\\WCM4.txt',sep='\t',header=T,stringsAsFactors = F) library(reshape2) #Melt the data into three columns with 70 rows: melted_data<-melt(data,id.vars = 1, measure.vars = 2:6) #Plot using ggplot2 library(ggplot2) plot<- ggplot(data = melted_data, aes(x=x, y=value)) plot <- plot + stat_boxplot(geom ='errorbar',aes(group=x)) plot <- plot + geom_boxplot(aes(group=x)) plot <- plot + scale_x_continuous(breaks = 1:14, labels = 1:14) I also noticed that in rows 2 and 14, the "upper" is greater than "ymax." Maybe the data was entered incorrectly? -- View this message in context: http://r.789695.n4.nabble.com/Boxplot-of-mean-sd-max-min-without-raw-data-tp4730939p4732696.html Sent from the datatable-help mailing list archive at Nabble.com. From dangerousfrizbee at gmail.com Wed Apr 19 08:18:22 2017 From: dangerousfrizbee at gmail.com (dangerousfrizbee) Date: Tue, 18 Apr 2017 23:18:22 -0700 (PDT) Subject: [datatable-help] Boxplot of mean, sd, max, min without raw data In-Reply-To: <1492526817441-4732696.post@n4.nabble.com> References: <1491223400029-4730939.post@n4.nabble.com> <1492030143869-4731631.post@n4.nabble.com> <1492118344602-4732123.post@n4.nabble.com> <1492526817441-4732696.post@n4.nabble.com> Message-ID: thank you so much!! works like a charm and I would never have figured it out on my own On 18 April 2017 at 16:46, affableambler [via R] < ml-node+s789695n4732696h36 at n4.nabble.com> wrote: > Hi Susan, > > This will require reshaping the data: > > data<-read.table('E:\\Libraries\\Documents\\WCM4.txt',sep='\t',header=T,stringsAsFactors > = F) > > library(reshape2) > > #Melt the data into three columns with 70 rows: > melted_data<-melt(data,id.vars = 1, measure.vars = 2:6) > > #Plot using ggplot2 > library(ggplot2) > plot<- ggplot(data = melted_data, aes(x=x, y=value)) > plot <- plot + stat_boxplot(geom ='errorbar',aes(group=x)) > plot <- plot + geom_boxplot(aes(group=x)) > plot <- plot + scale_x_continuous(breaks = 1:14, labels = 1:14) > > I also noticed that in rows 2 and 14, the "upper" is greater than "ymax." > Maybe the data was entered incorrectly? > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > http://r.789695.n4.nabble.com/Boxplot-of-mean-sd-max-min-without-raw-data- > tp4730939p4732696.html > To unsubscribe from Boxplot of mean, sd, max, min without raw data, click > here > > . > NAML > > -- Susan M Miller Postdoctoral Fellow FitzPatrick Institute of African Ornithology DST-NRF Centre of Excellence University of Cape Town Rondebosch 7701 South Africa -- View this message in context: http://r.789695.n4.nabble.com/Boxplot-of-mean-sd-max-min-without-raw-data-tp4730939p4732735.html Sent from the datatable-help mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nfields at gmail.com Wed Apr 19 17:23:33 2017 From: nfields at gmail.com (affableambler) Date: Wed, 19 Apr 2017 08:23:33 -0700 (PDT) Subject: [datatable-help] Boxplot of mean, sd, max, min without raw data In-Reply-To: References: <1491223400029-4730939.post@n4.nabble.com> <1492030143869-4731631.post@n4.nabble.com> <1492118344602-4732123.post@n4.nabble.com> <1492526817441-4732696.post@n4.nabble.com> Message-ID: <1492615413795-4732763.post@n4.nabble.com> My pleasure Susan. I had never used the reshape package before so it was a good learning opportunity for me as well. Glad I could help. Noah -- View this message in context: http://r.789695.n4.nabble.com/Boxplot-of-mean-sd-max-min-without-raw-data-tp4730939p4732763.html Sent from the datatable-help mailing list archive at Nabble.com. From dhiv.shreya at gmail.com Wed Apr 26 13:03:49 2017 From: dhiv.shreya at gmail.com (Dhivya Narayanasamy) Date: Wed, 26 Apr 2017 04:03:49 -0700 (PDT) Subject: [datatable-help] Plotting Time Series data : R, Plotly, Timestamp values Message-ID: <1493204629652-4733001.post@n4.nabble.com> hi, I have a data frame "gg", that looks like this: > head(gg) timestamps value 1 2017-04-25 16:52:00 -0.4120000 2 2017-04-25 16:53:00 -0.4526667 3 2017-04-25 16:54:00 -0.4586667 4 2017-04-25 16:55:00 -0.4606667 5 2017-04-25 16:56:00 -0.5053333 6 2017-04-25 16:57:00 -0.5066667 I need to plot this as a Time series data to do forecasting. 1) I am changing the class of "Timestamps" column from factor to as.POSIXct. gg$timestamps <- as.POSIXct(gg$timestamps, format = "%Y-%m-%d %H-%M-%S") 2) Now converting the dataframe to time series gg.ts <- xts(x=gg$value, order.by = gg$timestamps) 3) Now fitting the time series model using auto.arima fitting <- auto.arima(gg.ts) 4) Forecasting fore <- forecast(fitting, h=30, level = c(80,95)) 5) I am using plotly to this forecast model (Inspired from here : https://plot.ly/r/graphing-multiple-chart-types/#plotting-forecast-objects ) plot_ly() %>% add_lines(x = time(gg.ts), y = gg.ts, color = I("black"), name = "observed") %>% add_ribbons(x = time(fore$mean), ymin = fore$lower[, 2], ymax = fore$upper[, 2], color = I("gray95"), name = "95% confidence") %>% add_ribbons(x = time(fore$mean), ymin = fore$lower[, 1], ymax = fore$upper[, 1], color = I("gray80"), name = "80% confidence") %>% add_lines(x = time(fore$mean), y = fore$mean, color = I("blue"), name = "prediction") The plot comes out wrong: 1) x axis labels are wrong. It shows some irrelevant values on axis. 2) the plot is not coming out. I referred to this link ( http://stackoverflow.com/questions/10302261/forecasting-time-series-data ) for correcting the x axis lables. unfortunately it throws error for timestamp values, like this: > gg.xts <- ts(new_gg, frequency = 1, start = (2017-04-25 16:52:00)) Error: unexpected numeric constant in "gg.xts <- ts(new_gg, frequency = 1, start = (2017-04-25 16" Please help me. Thank you in advance. Regards,Dhivya -- View this message in context: http://r.789695.n4.nabble.com/Plotting-Time-Series-data-R-Plotly-Timestamp-values-tp4733001.html Sent from the datatable-help mailing list archive at Nabble.com.