How can I convert DataTable in C# to a DataFrame using RdotNet - datatable

I am writing a program in c# and using RdotNet to connect C# to R. I convert the value from dataGridView to DataTable in order to pass the value to another class. Then, I want to convert this DataTable into Dataframe using RdotNet.
Is it possible to convert DataTable or string[,] generated from dataGridView in C# to a DataFrame using R.Net? How can I do this?

I just answered the question Creating a Data.Frame using R.NET, which is similar to what you are asking. I missed this present question when it was first asked.
Note that the latest documentation is now hosted at http://jmp75.github.io/rdotnet, not the codeplex site.

Related

Unable to convert the row into Colum in PDF doc using UniPDF

I am trying to convert the row of a PDF table in a column using UniPDF Go Library, I have tried the example they are mentioned at https://github.com/unidoc/unipdf-examples/blob/master/tables/pdf_tables_row_wrap.go but I am not able to modify the document as required.
Any help would be appreciated.
Not sure if I understand this correctly, but I am assuming you have input data that you want to display in a single column.
To achieve this, you can create a single-cell column:
https://github.com/unidoc/unipdf-examples/blob/fe269eb0efffed8e199c82cb7b7b4a38859b35d7/tables/pdf_tables_simple.go#L98
with
table := c.NewTable(1)
I have created a play for this: https://play.unidoc.io/p/3421387bcde00a52
see also
https://apidocs.unidoc.io/unipdf/v3.20.0/github.com/unidoc/unipdf/v3/creator/#Creator.NewTable

Data Validation Dropdown With Filtered Data Range

I'd like to use data in column D
For a drop down in another sheet (data validation)
Only items where column A is less than 9
I tried List from a range
But it looks like you cannot put a formula in the range box
e.g.
=FILTER(GrpsTY!D2:D, GrpsTY!A2:A < 9)
Any suggestions?
formulas are not supported in data validation. the best course of action is to create a helper column with your filtered entries and then feed it to data validation.
Maybe they have added the functionality since the most recent answer (last July, 2020)?
I'm trying to figure out a formula that will let me validate data using a filtered list, and stumbled onto this:
This image shows that Google Sheets supports data validation using a custom formula
For Criteria, select "Custom formula is" instead of the default, "List from a range".
Hope this helps anyone who comes after me :)

Dynamic dataSet values In BIRT

I am using BIRT. In my dataset, sometimes my query returns 5 columns, sometimes 6 or more than that i.e basically, my dataset is dynamic. How to prepare a report using dynamic dataSet?
BIRT provides a Design Engone API to create or modify report designs at runtime. You can use this API in Java or within Javascript event handler (report.beforeFactory()).
http://www.eclipse.org/birt/documentation/integrating/deapi.php
On the following page you can find examples how to use the API: https://bitbucket.org/yaytay/spudsoft-birt-dynamic-columns/wiki/Home

ssrs questions regarding drop down menu and dataset

I am using SSRS through VS 2010 and have the following questions:
Can I define a drop down menu without defining a dataset?
I have a dataset defined, is there anyway to add "manual" values to this dataset? The background requirement of this is that the report query is based on this dataset. However I want to have an option in the dataset where it says "all" in order to allow the user to see everything instead of narrowing down results based on the dataset.
Thanks,
Bruce
I am a newbie to SQL Server reports and found my answers:
For the first one, can simply create a table and use a dataset on the created table with customzied values.
Same goes for the second one, the manual data can be added to the table itself.

Linq stored procedure with dynamic results

So I'm extremely new to Linq in .Net 3.5 and have a question. I use to use a custom class that would handle the following results from a store procedure:
Set 1: ID Name Age
Set 2: ID Address City
Set 3: ID Product Price
With my custom class, I would have received back from the database a single DataSet with 3 DataTables inside of it with columns based on what was returned from the DB.
My question is how to I achive this with LINQ? I'm going to need to hit the database 1 time and return multiple sets with different types of data in it.
Also, how would I use LINQ to return a dynamic amount of sets depending on the parameters (could get 1 set back, could get N amount back)?
I've looked at this article, but didn't find anything explaining multiple sets (just a single set that could be dynamic or a single scalar value and a single set).
Any articles/comments will help.
Thanks
I believe this is what you're looking for
Linq to SQL Stored Procedures with Multiple Results - IMultipleResults
I'm not very familiar with LINQ myself but here is MSDN's site on LINQ Samples that might be able to help you out.
EDIT: I apologize, I somehow missed the title where you mentioned you wanted help using LINQ with Stored Procedures, my below answer does not address that at all and unfortunately I haven't had the need to use sprocs with LINQ so I'm unsure if my below answer will help.
LINQ to SQL is able hydrate multiple sets of data into a object graph while hitting the database once. However, I don't think LINQ is going to achieve what you ultimately want -- which as far as I can tell is a completely dynamic set of data that is defined outside of the query itself. Perhaps I am misunderstanding the question, maybe it would help if you provide some sample code that your existing application is using?
Here is a quick example of how I could hydrate a anonymous type with a single database call, maybe it will help:
var query = from p in db.Products
select new
{
Product = p,
NumberOfOrders = p.Orders.Count(),
LastOrderDate = p.Orders.OrderByDescending().Take(1).Select(o => o.OrderDate),
Orders = p.Orders
};

Resources