Beispiel #1
0
        public async Task GetDataFrame()
        {
            await _session.ExecuteAsync("x <- mtcars");

            var df = await _session.GetDataFrameAsync("x");

            df.RowNames.First().Should().Be("Mazda RX4");
            df.ColumnNames.Should().HaveCount(11);

            var colData = df.GetColumn("mpg");

            colData.Should().HaveCount(32);
            colData[0].Should().Be(21);
        }
Beispiel #2
0
        private async void getDataframe_Click(object sender, EventArgs e)
        {
            try {
                await _sessionStartTask;
                var   df = await _session.GetDataFrameAsync(codeBox.Text);

                DisplayResult(df);
            } catch (Exception ex) {
                DisplayResult(ex.Message);
            }
        }
Beispiel #3
0
 public async Task <DataFrame> GetDataFrameAsync(string name)
 {
     return(await rHostSession.GetDataFrameAsync(name));
 }