search for: testx

Displaying 20 results from an estimated 27 matches for "testx".

Did you mean: test
2011 Sep 02
2
How to keep the same class?
Hello Please see the example below > class(testX) [1] "matrix" > class(testX[1,]) [1] "numeric" Why not matrix? What am I missing here? Is there a way to keep the same class? The reason for the question is that I want to implement a k-step ahead prediction for my own routines and R wrecks does not seem to...
2005 Jun 01
7
Which variable exist after random
Dear R-helper, How could I count only some variable was exist after running sample (random) function. For example, > testx <- factor(c("Game","Paper","Internet","Time","Money")) > for(i in 1:2) { + x <- sample(testx,replace=TRUE) + print(x) + } [1] Money Money Time Internet Time Levels: Game Internet Money Paper Time [1] Time...
2012 Oct 10
2
lm on matrix data
...x, have to admit it is very trivial but I just couldn't find the answer after searched the mailing list and other online tutorial. It would be great if you could help. I have a matrix "trainx" of 492(rows) by 220(columns) that is my x, and trainy is 492 by 1. Also, I have the newdata testx which is 240 (rows) by 220 (columns). Here is what I got: py <- predict(lm(trainy ~ trainx ), data.frame(testx)) Warning message: 'newdata' had 240 rows but variable(s) found have 492 rows The fitting formula I intended is: trainy ~ trainx[,1] + trainx[,2] + .. +trainx[,220]. Any help...
2011 Sep 08
0
Consistently printing the name of an object passed to a function; & a data-auditing question
...stead of labels. A few columns in some years of a survey have undocumented differences in units. Halfway through a 20-year annual survey, they add two more allowable answers to a question. etc. I'm looking for things to make my data auditing go faster. One of them is a dopy little function, testX(), bundling together a variety of r tools to tell me what is in an object. Here it is: testX <- function(objectX, bar=TRUE) { # A useful diagnostic function object.name <- deparse(substitute(objectX)) if(bar) cat("########################\n"); # visual separation betw...
2012 Mar 21
2
glmnet: obtain predictions using predict and also by extracting coefficients
...) # fit training model myglmnet =cv.glmnet(data.train,y) # predictions by using predict function yhat_enet <- predict(myglmnet,newx=data.test, s="lambda.min") # attempting to get predictions by using coefficients beta <- as.vector( t(coef(myglmnet,s="lambda.min"))) testX <- cbind(1,data.test.std) yhat2 <- testX %*% beta # does not match plot(yhat2,yhat_enet)
2009 Jun 08
3
caret package
...a confusion matrix and it seems to be giving me errors. x<-read.csv("x.csv", header=TRUE); y<-read.csv("y.csv", header=TRUE); tc=trainControl(method="cv", number=10 ); glmmat<-train(x,y,method="glmnet", trControl=tc); extractPrediction(list(glmmat,testX=x,testY = y)); any help would be great thanks vss [[alternative HTML version deleted]]
2012 Sep 14
0
[LLVMdev] Problem using llvm::cl::bits class with gcc 4.7
Hi, I'm currently working on the KLEE tool that uses LLVM (2.9 because that's what KLEE currently uses) and in particular I'm having an unexpected problem with the llvm::cl::bits class. I try something like this... enum testx { A,B }; cl::bits<testx> queryLoggingOptions("option",cl::values( clEnumVal(A,"this is a"), clEnumVal(B,"this is b"), clEnumValEnd ) ); And when I compile (gcc 4.7.1 20120721 (prerelease) ) I get an error like this... In file...
2011 Jul 09
3
Using str() in a function.
...le little function to display a couple of things about a object, let's say the summary() and the str(), sequentially, preferably without a bunch of surplus lines between them. I have tried a large number of things; none do what I want. > GG<- c(1,2,3) # This one ignores the str(). > testX <- function(X) {return(summary(X)); str(X)} > testX(GG) Min. 1st Qu. Median Mean 3rd Qu. Max. 1.0 1.5 2.0 2.0 2.5 3.0 # So does this one. > testX2 <- function(X) {return(summary(X)); return(str(X))} > testX2(GG) Min. 1st Qu. Median Mean 3rd...
2006 Dec 13
2
persp() problem
...rho2*qnorm(x)/sqrt(1-rho2^2)))) +sqrt(1-rhoF^2)*qnorm(0.95)),-0.3935119, 0.4227890, 0.2701648)} z <- outer(x,y,f) persp(x,y,z) The R will display: "Error in persp.default(x, y, z) : increasing 'x' and 'y' values expected" So I try to adjust it to: testx <- unique(sort(u1data)) testy <- unique(u2data[order(u1data)]) testf <- function(testx,testy){qgev(pnorm(rhoF*qnorm(pnorm((qnorm(testy)-rho2*qnorm(testx)/sqrt(1-rho2^2)))) +sqrt(1-rhoF^2)*qnorm(0.95)),-0.3935119, 0.4227890, 0.2701648)} testz <- unique(outer(testx,testy,testf)[order(u1...
2012 May 16
1
survival survfit with newdata
...39;newdata' with really new data. Thanks in advance. DK > x<-matrix(rnorm(100*20),100,20) > time<-runif(100,min=0,max=7) > status<-sample(c(0,1), 100, replace = TRUE) > trainX<-x[11:100,] > trainTime<-time[11:100] > trainStatus<-status[11:100] > testX<-x[1:10,] > coxph.model<- coxph(Surv(trainTime,trainStatus)~ trainX) > sfit<- survfit(coxph.model,newdata=data.frame(testX)) > dim(sfit$surv) [1] 90 90 [[alternative HTML version deleted]]
2016 Sep 18
2
Problem Samba 4.5
thanks for your attention. temporarily with the following script I'm looking at myself. #!/bin/bash INTERVAL=180 LOG=true function log { if $LOG; then echo $1 fi } while true; do testx=`ps -auxw | grep "smbd" | wc -l` testy=`netstat -ap | grep samba | grep sock | wc -l` if test "$testx" -gt "50" -a "$testy" -gt "50" ;then echo "samba problem" service samba restart else echo "samba no problem" fi sleep $INTERVAL...
2013 Feb 18
2
mtext unicode failure
Readers, How to solve this unicode input error please? > postscript("~/tmp/test.eps",width=100/25.4,height=100/25.4,horizontal=FALSE,onefile=TRUE,paper="special") > testx<-seq(1:5) > testy<-seq(1:5) > plot(testy~testx) > mtext('text (O?)\n more text',side=3,line=1) Warning messages: 1: In mtext("text (O?)\n more text", side = 3, line = 1) : conversion failure on 'text (O?)' in 'mbcsToSbcs': dot substituted for <e...
2005 Feb 01
2
assign connections automatically
...the point where I can do it outside of the function, but not inside, using assign. I'm sure I'm missing something obvious about the inherent properties of functions..... #first six lines just setup for this example > x<-1:20 > y<-20:40 > z<-40:60 > write(x, file="testx.txt") > write(y, file="testy.txt") > write(z, file="testz.txt") > inConnect <- function(){ + fn <- dir(pattern="*.txt") # grab only *.txt files + fn2 <- gsub('.txt', "", fn) # removes the '.txt' from each string + for(i...
2011 Sep 15
2
Returning the name of an object passed directly or from a list by lapply
Dear folks: Let?s suppose I want a function to print return the name of the object passed to it. > myname <- function(object) {out<-deparse(substitute(object)); out} This works fine on a single object: > O1 <-c(1:4) > myname(O1) [1] "O1" However it does not work if you use lapply to pass it the same object from a list: > O2 <-c(1:4) > object.list <-
2016 Sep 18
0
Problem Samba 4.5
...mail.com> escreveu: > > thanks for your attention. > > temporarily with the following script I'm looking at myself. > > #!/bin/bash > INTERVAL=180 > LOG=true > function log { > if $LOG; then > echo $1 > fi > } > while true; do > testx=`ps -auxw | grep "smbd" | wc -l` > testy=`netstat -ap | grep samba | grep sock | wc -l` > if test "$testx" -gt "50" -a "$testy" -gt "50" ;then > echo "samba problem" > service samba restart &...
2002 May 30
1
hclust.identify problem
Having some problems with using hclust.identify on my data, I revert to trying it out on the example in the help manual. My result is still the same (as with my own data): data(iris) hci <- hclust(dist(iris[,1:4])) plot(hci) testx<-identify.hclust(hci) Error in rect.hclust(x, k = k, x = x$x, cluster = cluster[, k - 1], border = "red") : k must be between 2 and 0 identify.hclust(hci, function(k) print(table(iris[k,5]))) Error in rect.hclust(x, k = k, x = x$x, cluster = cluster[, k - 1], border = "...
2016 Sep 17
2
Problem Samba 4.5
I reported the problem two months ago . I knew this would happen . :(( 2016-09-17 22:42 GMT+03:00 Edson Tadeu Almeida da Silveira via samba < samba at lists.samba.org>: > Sorry, the problem came back, after 3 hours. > > att, > > 2016-09-17 13:11 GMT-03:00 Edson Tadeu Almeida da Silveira < > edson.tadeu at gmail.com>: > > > I don't know if it is a
2005 Jul 07
0
rxfax/txfax
...g RxFAX("Zap/2-1", "/fax/rx.tif") in new stack Urgent handler DCS with final frame tag In state 9 Coarse carrier frequency 1699.90 (66) Training error 0.249420 Training succeeded (constellation mismatch 0.407855) In SENDER: -- Executing TxFAX("Zap/1-1", "/fax/testX.tif|caller|debug") in new stack Urgent handler Slow carrier up Slow carrier down Slow carrier up <<< DIS: 80 00 ce f4 80 80 81 80 80 80 18 DIS with final frame tag In state 10 DIS: Prefer 256 octet blocks Can receive fax Supported data signalling rates: V.27ter and V.29 R8x7.7lin...
2000 Jul 24
1
NLS for smbmount
I'm using Urban Widmark's smbfs/Linux kernel patch (2.2.14) to display iso-8859-1 characters in file names on NT mounts. The patch works fine for me; I'm only wondering if and when it will be integrated into the Linux kernel. After all, NLS is an essential feature and not just nice-to-have for all non-anglophone users... Yes, I know this is a bit off-topic on this list, but there
2013 May 07
1
opus encoding parameters.
hi! i am getting hard to find, what is the encoding parameters that is used for coding in the Bitconformance vectors testvectorx.dec. pls send or ref some link about this. i found decoding parameters -d 48000 2 testvectorx.bit testx.out similarly i need to know for encoder. thanks in advance. Regards, sugumar -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/opus/attachments/20130507/034d46ac/attachment.htm