VS2010中有多个构建配置的项目?(one project with multiple build configurations in VS2010?)
我有ac #windows应用程序项目。 我想构建两个.exe文件,一个在64位操作系统上运行为64位(通过平台定位'任何CPU'),另一个在64位操作系统上运行为32位(通过平台定位x86)。
目前,我应该在需要其他配置时更改构建配置,并重命名已编译的文件以区分32和64。
有没有更简单的方法来管理多个配置?
I have a c# windows application project. I want to build two .exe files, one is run as 64bit on 64 bit OS (by platform targeting 'Any CPU'), the other is run as 32 bit on 64 bit OS (by platform targeting x86).
Currently, I should change my build configuration whenever i need the other configuration, and rename the compiled file to distinguish between 32 and 64.
Is there an easier way to manage multiple configurations?
原文:https://stackoverflow.com/questions/3442435
最满意答案
我正在使用“dplyr”包来格式化输出。 在“dlply”函数中使用的函数中,你应该使用summary()来表示lm(),所以当你调用“coef”时它也会包含p.values。
test_data <- data.frame(key = c("a","a","a","a","a","b","b","b","b","b"), y = c(100,180,120,60,140,200,220,240,260,280), x1 = c(50,60,79,85,90,133,140,120,160,170), x2 = c(20,18,47,16,15,25,30,25,20,15)) model<-by(test_data,test_data$key,function(x)summary(lm(y~x1+x2,x))) R2<-t(data.frame(lapply(model,function(x)x$adj.r.squared)));colnames(R2)<-"R2_adj";R2 R2_adj a -0.8939647 b 0.4292186 Co<-as.data.frame(t(data.frame(lapply(model,function(x)x$coef)))) colnames(Co)<-c("intercept","x1","x2") library(dplyr) Co%>% mutate(key=substr(rownames(Co),1,1), variable=substr(rownames(Co),3,12))%>% select(key,variable,intercept,x1,x2) key variable intercept x1 x2 1 a Estimate 162.1822438 -0.6037364 0.07628315 2 a Std..Error 141.3436897 1.8054132 2.29385395 3 a t.value 1.1474318 -0.3344035 0.03325545 4 a Pr...t.. 0.3699423 0.7698867 0.97649134 5 b Estimate 271.0532276 0.3624009 -3.62853907 6 b Std..Error 196.2769562 0.9166979 3.25911570 7 b t.value 1.3809733 0.3953330 -1.11335080 8 b Pr...t.. 0.3013515 0.7307786 0.38142882
I'm using the "dplyr" package to formatting the output. In the function that you use inside the "dlply" function you should use summary() to the lm(), so when you call "coef" it will also include the p.values.
test_data <- data.frame(key = c("a","a","a","a","a","b","b","b","b","b"), y = c(100,180,120,60,140,200,220,240,260,280), x1 = c(50,60,79,85,90,133,140,120,160,170), x2 = c(20,18,47,16,15,25,30,25,20,15)) model<-by(test_data,test_data$key,function(x)summary(lm(y~x1+x2,x))) R2<-t(data.frame(lapply(model,function(x)x$adj.r.squared)));colnames(R2)<-"R2_adj";R2 R2_adj a -0.8939647 b 0.4292186 Co<-as.data.frame(t(data.frame(lapply(model,function(x)x$coef)))) colnames(Co)<-c("intercept","x1","x2") library(dplyr) Co%>% mutate(key=substr(rownames(Co),1,1), variable=substr(rownames(Co),3,12))%>% select(key,variable,intercept,x1,x2) key variable intercept x1 x2 1 a Estimate 162.1822438 -0.6037364 0.07628315 2 a Std..Error 141.3436897 1.8054132 2.29385395 3 a t.value 1.1474318 -0.3344035 0.03325545 4 a Pr...t.. 0.3699423 0.7698867 0.97649134 5 b Estimate 271.0532276 0.3624009 -3.62853907 6 b Std..Error 196.2769562 0.9166979 3.25911570 7 b t.value 1.3809733 0.3953330 -1.11335080 8 b Pr...t.. 0.3013515 0.7307786 0.38142882
相关问答
更多-
适合单个模型时 rating ~ A + B + C + D + E + F 你得到有意义的非NA结果。 当您通过resp.id为每个子集/因子级别拟合相同的模型时,您将获得NaN结果。 我100%确定在某些因素级别,您没有足够的数据来适应上述模型。 首先检查每个组的数据量是个好主意。 您可以使用: N <- with(data.coded, tapply(rating, resp.id, FUN = length)) 您的模型有7个系数(1个用于截距,1个用于A,B,...,F)。 那么which(N ...
-
如何使用可能与lm一起使用?(how to use use possibly with lm?)[2022-06-03]
您可以将整个函数包装possibly ,因此如果整个函数在任何地方失败,您将获得NA。 get_mean <- possibly(function(data, myvar) { col_name <- as.character(substitute(myvar)) fmla <- as.formula(paste(col_name, "~ 1")) model <- lm(data = data, fmla, na.action = 'na.omit') tidy(m ... -
以下是可能在未来的rlang中使用的公式构造函数: f <- function(x, y, flatten = TRUE) { x <- enquo(x) y <- enquo(y) # Environments should be the same # They could be different if forwarded through dots env <- get_env(x) stopifnot(identical(env, get_env(y))) # Flat ...
-
有时候为lapply提供一个匿名函数会lapply : fits <- lapply(list(z ~ x + y, z ~ x + log(y)), function(f) lm(f, data = dat)) stepAIC(fits[[1]]) #works 请注意,这(通常是我首选显式确定范围的方法)不起作用,因为stepAIC找不到DF : fits <- lapply(list(z ~ x + y, z ~ x + log(y)), ...
-
r函数用子集调用lm(r functions calling lm with subsets)[2022-11-11]
这个问题似乎与该子集没有关系。 当我更改为subset = (state == 1)时,我从您的函数中得到相同的错误。 您的函数的参数不被正确传递和评估。 我认为你最好使用do.call myfunction <- function(formula, data, subset) { do.call("lm", as.list(match.call()[-1])) } myfunction(log(price) ~ log(pop) + log(ndi), Cigar, state == 1) ... -
引导函数“期待”获得一个具有两个参数的函数:第一个是data.frame,第二个是“indices”向量(可能有重复的条目,可能没有使用所有索引)用于选择行然后可能有一些重复或一式三份。)然后用替换的样本确定重复的模式和原始数据帧的三次重复(多次由“R”用不同的“选择集”确定),将那些传递到下面的indices参数中。 boot.function,然后收集R个函数应用程序的结果。 关于引导对象的print方法报告的内容,请看一下(使用str()检查返回的对象后完成的操作 > duncan.boot$t0 [ ...
-
Dirk的答案会更快,但如果方便的话,这里是纯R的实现(从summary.lm提取你需要的位,并假设非全级模型矩阵没有问题等) 例: set.seed(101) X <- cbind(1,matrix(1:10)) y <- rnorm(10) m <- .lm.fit(X,y) p值计算: rss <- sum(m$residuals^2) rdf <- length(y) - ncol(X) resvar <- rss/rdf R <- chol2inv(m$qr) se <- sqrt(diag(R ...
-
在R中使用coef和summary.lm与robcov(提取p值)(Using coef and summary.lm with robcov in R (extracting p-values))[2022-03-01]
通过print.ols和prModFit ,我想出了这个。 errordf <- m2$df.residual beta <- m2$coefficients se <- sqrt(diag(m2$var)) Z <- beta/se P <- 2 * (1 - pt(abs(Z), errordf)) 将m2更改为另一个robcov模型。 通过比较P到print(m2)的结果print(m2)自己尝试一下 Hacking through print.ols and prModFit, I came up ... -
我正在使用“dplyr”包来格式化输出。 在“dlply”函数中使用的函数中,你应该使用summary()来表示lm(),所以当你调用“coef”时它也会包含p.values。 test_data <- data.frame(key = c("a","a","a","a","a","b","b","b","b","b"), y = c(100,180,120,60,140,200,220,240,260,280), ...
-
我已经看到了2个关闭投票将其迁移到Cross Validated,但我认为这应该留在Stack Overflow上。 确实,在lm和lmp使用的非旋转QR分解策略下,t统计量和p值对于术语的规范顺序不是不变的,但是如新编辑所示,对于OP的数据,这些统计量应该是不变的。 所以在编程层面必须有一些敏感的东西。 我的快速诊断建议,如果我们设置seqs = TRUE ,而不是使用默认的FALSE ,我们将获得一致的结果: ## I have subsetted data with `Presence == 1` i ...