search for: firstrow

Displaying 8 results from an estimated 8 matches for "firstrow".

2006 Apr 04
1
Help on computing a matrix from another matrix in R
...lues of the differences is 3.5. This is given by this code: sum(abs(temp[1,]-temp[2,])) My issue is that I want a 29 x 29 matrix of these similarity scores. I have made some progress, but I cannot quite get it. The closest code I have is the following (all on one line, of course): ans<- for (firstrow in 1:29) { for (escrow in 1:29) { print(sum(abs(temp[firstrow,] - temp[secrow,]) ) ) } } I realize that print is not the right function to be using, but at least it displays my results in a long list. Also, ans has the following characteristics: > ans [1] > dim(ans) NULL > mode(ans) 1...
2008 Nov 06
0
problems executing a bulk load with SQL server
...as "CREATE TABLE", "SELECT * FROM", "ALTER TABLE" and "INSERT" data work well. But, given the size of the data to be loaded, I had to opt for a bulk load like this: sqlQuery(channel, "BULK INSERT mytable FROM \\\\rhea\\users\\Risk\\Dump\\myfile.csv WITH (FIRSTROW=2, LASTROW=10);") The response is [1] "[RODBC] ERROR: Could not SQLExecDirect" [2] "42000 170 [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '\\'." Similar errors are produced by using the "/" slashes instead. Therefore, the...
2011 May 02
2
Lasso with Categorical Variables
Hi! This is my first time posting. I've read the general rules and guidelines, but please bear with me if I make some fatal error in posting. Anyway, I have a continuous response and 29 predictors made up of continuous variables and nominal and ordinal categorical variables. I'd like to do lasso on these, but I get an error. The way I am using "lars" doesn't allow for the
2008 Apr 08
1
Weibull maximum likelihood estimates for censored data
...ef(fit2)) # Maximum log likelihood : Exponential LR0 <- (Le/Lw) # Likelihood ratio with duration sample NSimM <- cbind(as.matrix(sort(rchisq(nsim,1,0))),runif(nsim,0,1)) # chi-square df1 simulations, uniform rvs Uniftest <- runif(1,0,1) firstrow <- cbind(LR0,Uniftest) # use sample LR as LR NSimM <- rbind(firstrow,NSimM) Test <- matrix(rep(0,2*(nsim+1)),nrow=(nsim+1)) NSimM <- cbind(NSimM,Test) for(i in 2:nsim+1) { # indicates the number...
2007 Jun 26
1
A really simple data manipulation example
...an , of course , contain many paragraphs: data processing functions, print statements, asciitobinary statements, etc.). If you've worked with lab data, you know lab data does not look so simplistic. I need a simple example. Vilno has a lot of functionality, many-to-many joins, adding columns, firstrow() and lastrow() flags, and so forth. A fair amount of complex data manipulations have already been tested with test programs ( in the tarball ). Of course a simple example cannot show you that, it's just a small taste. ********************************************* If you've never used SPS...
2009 May 09
2
Sweave \Sexpr{} advice please
Dear List, First off, my deepest gratitude to the Sweave developers: this tool has improved my quality greatly. A question in my work I use \Sexpr{} statements scalar values and the xtable package for all manner of tables. What I'd like to do is to use a vector inline, rather than a whole separate table. Something like: %%%%%%%%%%%%%%%% begin code % Latex junk % Sweave block:
2004 Sep 16
5
Indexing lists
DeaR useRs: I have a list with 500 elements, in each other there are data.frames and I want to take the first row and the first column of each elements of my list since the first to the 500-th. Thanks and excuse my bad English. --- [[alternative HTML version deleted]]
2019 Nov 30
1
Re: virt-df for KVM
On Sat, Nov 30, 2019 at 06:49:29PM +0800, zxs11289 wrote: > I face a problem on KVM using virt-df。 I have two computer,they > have installed tools for KVM. The computer(ip 15)has no virtual > machine and computer(ip 33)has two virtual machines。on the > computer(ip33), i run the command “virt-df” if on the computer(ip15), > i run the command “virt-df --connect