剪贴板复制了决策树报告中的R方表,6行6列,包含文本。 如何将此表粘贴到新表中?
谢谢你!
R 方 RMSE N 分割数 AICc
训练 0.502 2.5656293 3625 20 17162.6
验证 -0.77 4.6256646 3625
测试 -0.70 4.3112172 3635

我不太确定你想问什么。我的想法是,你有两条线试图达到相同的目的。第一行使用 JMP 连接平台将数据表添加到现有数据表中。 第二行是否尝试替换 dt3 数据表中的值?
感谢 gzmorgan0! 我从这个例子中学到了很多东西。
在语法上,JSL的行列要求与VBA一致。
但是VBA的…… Cells(2, "").Resize(UBound(br), 1) = br ……更加灵活。

您始终可以从您引用的 R Square 表创建 JMP 数据表,然后将该表另存为 csv、txt 或 slsx 文件。然后读入您的 VBA 脚本。
在 JMP 应用程序中,复制和粘贴数据表通常不是用于移动数据表内容的方法。
请您解释一下您正在尝试将剪贴板粘贴到哪个应用程序等中。
您需要开始阅读一些基础知识。 每种计算机语言都有自己的语法。
Names Default to Here(1);
dt = Open("$sample_data/Boston Housing.JMP");
dt << Make Validation Column(
Training Set( 0.50 ),
Validation Set( 0.25 ),
Test Set( 0.25 ),
Formula Random
);
cart = dt<< Partition(
Y( :mvalue ),
X(
:crim,
:zn,
:indus,
:chas,
:nox,
:rooms,
:age,
:distance,
:radial,
:tax,
:pt,
:b,
:lstat
),
Validation( :Validation ),
Show Tree( 0 ),
Split History( 1 ),
Informative Missing( 1 ),
Initial Splits(
:lstat >= 7.79,
{:distance < 2.0788, {:nox >= 0.609, {:lstat >= 17.21, {:crim >= 10.8342, {},
{:nox < 0.74}}}}, {:lstat >= 14.8, {:crim >= 0.75026, {:b < 375.87}, {:tax
>= 304}}, {:rooms < 6.726, {:rooms < 6.101, {}, {:tax >= 422, {}, {:lstat
>= 11.98, {}, {:crim < 0.11425, {:rooms < 6.405}}}}}}}},
{:lstat >= 4.32, {:rooms < 6.8, {:rooms < 6.546, {:distance >= 4.4986,
{:indus < 5.64, {}, {:lstat >= 6.15}}}}, {:rooms < 7.52}}, {:b >= 392.83,
{:rooms < 7.61}, {:indus < 18.1}}}
),
SendToReport(
Dispatch( {}, "Partition Report", FrameBox, {Frame Size( 480, 218 )} )
)
);
rsq_dt = report(Cart)[TableBox(1)] << Make into Data Table;
//create a table with extra rows and extra columns
_xx=New Table("result", New Column("d1"), New Column("d2"), New Column("d3"), New Column("d4"),
New Column("Type", Character), New Column("RSQ"),
new Column("RMSE"), New Column("N"), New Column ("nsplits"),
new column("AICc"),
add rows(100)
);
nr = nrow(rsq_dt);
nc = ncol(rsq_dt);
cb=5; ce=cb + nc -1; //Column 5 is wher I want to paste it
rb=50; re=rb + nr -1;
//if rb> nrow(_xx) or ce>ncol(_xx) or the column data types do not match the next line will throw an error.<BR />//it is up to the scripter to do error checking
_xx[rb::re, cb::ce] = rsq_dt[1::nr, 1::nc];
close(rsq_dt, NoSave);
current data table(_xx);
_xx << bring window to front;
_xx << go to row(rb);
_xx << next selected;
您复制的表的第一列包含组名称“训练”、“验证”、“测试”、文本。您正在尝试将其粘贴到数字列而不是字符串中。 请注意,点符号代表空数字列。
JMP 维护整个列的数据类型。JMP 表就像数据库表一样,您不会发现某个人的姓名位于预期为电话号码的列的某行中。Excel、Statistica、旧RS/1 是显示表。 它们允许在单元格 A1 中显示美国宪法的序言,在单元格 A2 中显示今天的温度。
请注意,如果您想创建一个由许多“类似”表组成的表,例如许多分区,请选择“创建组合数据表”,它将创建一个包含所有分区的“拟合汇总表”的表。