我有一个带二元结果的回归模型.我用glmnet拟合了模型并得到了选定的变量及其系数.
由于glmnet不计算变量重要性,我想将精确输出(选定变量及其系数)提供给glm以获取信息(标准错误等).
我搜索了r文件,似乎我可以在glm中使用"method"选项来指定用户定义的函数.但我没有这样做,有人可以帮助我吗?
我正在尝试这个Jekyll主题 http://richbray.me/frap/
我想创建一个显示这个D3.js示例的博客文章:http: //bl.ocks.org/mbostock/4061502
所以主要的难点是如何让Markdown渲染脚本让d3.js显示其内容.有任何想法吗?
可再现的例子:
library("ff")
m <- matrix(1:12, 3, 4, dimnames=list(c("r1","r2","r3"), c("m1","m2","m3","m4")))
v <- 1:3
ffm <- as.ff(m)
ffv <- as.ff(v)
d <- data.frame(m, v)
ffd <- ffdf(ffm, v=ffv, row.names=row.names(ffm))
ffsave(ffd,file="C:\\Users\\R.wd\\ff\\ffd")
## Error in system(cmd, input = filelist, intern = TRUE) : 'zip' not found
Run Code Online (Sandbox Code Playgroud)
系统:Windows 7 64位,R 15.2 64位
安装了Rtools
zip 300xn-x64并解压缩设置为Windows Path的600xn文件夹
cmd行工作,键入zip或解压缩它显示功能信息
需要帮忙!任何建议表示赞赏.
可重现的例子:
sqlite db test3.s3db 有一张名为“MathRec”的表:
name score
Bill 2
Mary 3
John 3
Run Code Online (Sandbox Code Playgroud)
代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SQLite;
namespace ConsoleApplication7
{
class Program
{
static void Main(string[] args)
{
string fullPath = "C:\\Users\\Desktop\\dataset\\test3.s3db";
SQLiteConnection conread = new SQLiteConnection("Data Source=" + fullPath);
conread.Open();
string selectSQL = "SELECT * FROM MathRec";
SQLiteCommand selectCommand = new SQLiteCommand(selectSQL, conread);
SQLiteDataReader dataReader = selectCommand.ExecuteReader();
DataSet ds = new DataSet();
DataTable dt = new DataTable("MathRec");
dt.Load(dataReader); …Run Code Online (Sandbox Code Playgroud) 就像SAS一样,我可以做到
put @5 value1
@12 "="
@24 estimate1
;
Run Code Online (Sandbox Code Playgroud)
我可以在R中使用像"cat"这样的函数来打印出定位的值和对象吗?
如果我的问题清楚,请告诉我.
提前致谢!