similar to: help output figures in R

Displaying 20 results from an estimated 900 matches similar to: "help output figures in R"

2010 Jun 02
1
how to label the som notes by the majority vote
HI, Dear R community, I am using the following codes to do the som. I tried to label the notes by the majority vote. either through mapping or prediction. I attached my output, the left one dont have any labels in the note, the right one has more than one label in each note. I need to have only one label for each note either by majority vote or prediction. Can anyone give some suggestions or
2010 May 25
4
R eat my data
HI, Dear R community, My original file has 1932 lines, but when I read into R, it changed to 1068 lines, how comes? cdu@nuuk:~/operon$ wc -l id_name_gh5.txt 1932 id_name_gh5.txt > gene_name<-read.table("/home/cdu/operon/id_name_gh5.txt", sep="\t", skip=0, header=F, fill=T) > dim(gene_name) [1] 1068 3 -- Sincerely, Changbin -- Changbin Du DOE Joint Genome
2010 May 18
2
get the row sums
> head(en.id.pr) valid.gene_id b.pred rf.pred svm.pred 1521 2500151211 0 0 0 366 639679745 0 0 0 1965 2502081603 1 1 1 1420 644148030 1 1 1 1565 2500626489 1 1 1 1816 2501711016 1 1 1 > p.pred <- data.frame(en.id.pr, sum=apply(en.id.pr[,2:4], 1, sum)) #
2010 Jun 15
1
output from the gbm package
HI, Dear Greg and R community, I have one question about the output of gbm package. the output of Boosting should be f(x), from it , how to calculate the probability for each observations in data set? SInce it is stochastic, how can guarantee that each observation in training data are selected at least once? IF SOME obs are not selected, how to calculate the training error? Thanks? --
2010 Dec 16
1
my function does not work for large data set
Dear R community, I have one function, it works for small data set, but does not work on large data set, can anyone help me with this? > #creat new variable by dividing each aa dimer by total_length. > imper<-function(x, file) { + round(x/file$length, 5) + } > dim(test) [1] 999 2402 > test[varname[2:2401]]<-
2010 May 05
2
probabilities in svm output in e1071 package
svm.fit<-svm(as.factor(out) ~ ., data=all_h, method="C-classification", kernel="radial", cost=bestc, gamma=bestg, cross=10) # model fitting svm.pred<-predict(svm.fit, hh, decision.values = TRUE, probability = TRUE) # find the probability, but can not find. attr(svm.pred, "probabilities") > attr(svm.pred, "probabilities") 1 0 1 0 0 2 0
2010 Apr 15
2
r-loop
HI, Dear community, I am building the following loop, ww<-function(file) { lossw<-vector() for (x in seq(0.1, 0.9, by=0.1)) { cat('xweight ', x, '\n') lossw[i] <- cross.validation(file, x)$avg } return(lossw) } MY question is how to index the lossw[i]? for (i in 1:9) for (x in seq(0.1, 0.9, by=0.1)) Thanks so much!
2010 Apr 23
1
help in conditional histogram
Dear Dr. Sarkar, When I try to run the codes, I found the following problem: > h<- sample(1:14, 319, rep=T) > c<- sample(1:14, 608, rep=T) > n<- sample(1:14, 1140, rep=T) > vt<-c(h, c, n) > ta<-rep(c("h", "c", "n"), c(319, 608, 1140)) > > to<-data.frame(vt,ta) > library(lattice) Attaching package: 'lattice'
2010 Nov 04
4
how to work with long vectors
HI, Dear R community, I have one data set like this, What I want to do is to calculate the cumulative coverage. The following codes works for small data set (#rows = 100), but when feed the whole data set, it still running after 24 hours. Can someone give some suggestions for long vector? id reads Contig79:1 4 Contig79:2 8 Contig79:3 13 Contig79:4 14 Contig79:5 17
2010 Oct 12
1
need help with nnet
HI, Dear R community, My data set has 2409 variables, the last one is response variable. I have used the nnet after feature selection and works. But this time, I am using nnet to fit a model without feature selection. I got the following error information: > dim(train) [1] 1827 2409 nnet.fit<-nnet(as.factor(out) ~ ., data=train, size=3, rang=0.3, decay=5e-4, maxit=500) # model
2010 Sep 24
1
How to read this file into R.
Dear community, I have one file named ca_boost_feature.txt, Feature selection (Boosting:0.0025,5)! H.2.C C.1.D C.3.R E.0.N C.2.S C.0.G H.3.G log file: ep If I want to use the second line of this file, how to read it into R? varr<-read.table("/home/cdu/operon/carbonic/ca_boost_feature.txt", sep=" ", skip=1, header=F, strip.white=TRUE, nrows=1) Warning message: In
2010 May 05
3
sort the data set by one variable
> #sort the data by predicted probability > b.order<-bo.id.pred[(order(-predict)),] > b.order[1:20,] gene_id predict 43 637882902 0.07823997 53 638101634 0.66256490 61 639084581 0.08587504 41 637832824 0.02461066 25 637261662 0.11613879 22 637240022 0.06350477 62 639084582 0.02238538 63 639097718 0.06792841 44 637943079 0.04532625 80 640158389 0.06582658 3 637006517 0.57648451
2010 May 26
1
how to Store loop output from a function
HI, Dear R community, I am writing the following function to create one data set(*tree.pred*) and one vector(*valid.out*) from loops. Later, I want to use the data set from this loop to plot curves. I have tried return, list, but I can not use the *tree.pred* data and *valid.out* vector. auc.tree<- function(msplit,mbucket) { * tree.pred<-data.frame()
2010 Apr 26
3
R.GBM package
HI, Dear Greg, I AM A NEW to GBM package. Can boosting decision tree be implemented in 'gbm' package? Or 'gbm' can only be used for regression? IF can, DO I need to combine the rpart and gbm command? Thanks so much! -- Sincerely, Changbin -- [[alternative HTML version deleted]]
2011 Jan 20
2
auc function
Hi, there. Suppose I already have sensitivities and specificities. What is the quick R-function to calculate AUC for the ROC plot? There seem to be many R functions to calculate AUC. Thanks. Yulei [[alternative HTML version deleted]]
2011 Feb 07
1
can I use the output of a neural network as the fitness function of genetic algorithm?
Hi Everyone, I need to use genetic algorithm to find the minimum. The problem is, I cannot define the fitness function, but I can build a neural network from the input data and use the output as a fitness function. Can this be done? The other problem is, I know there are a few package in R related to GA. So far I know all of them take a specific function as fitness function, is
2011 Jun 22
1
question about read.columns
HI, Dear R community, I have a large data set names dd.txt, the columns are: there are 2402 variables. a1, b1, ..z1, a11, b11, ...z11, a111, b111, ..z111.. IF I dont know the relative position of the columns, but I know I need the following variables: var<-c(a1, c1,a11,b11,f111) Can I use read.columns to read the data into R? I have tried the following codes, but it does not work
2010 Jul 01
5
ROC curve in R
Hi, i have a fairly large amount of genomic data. I have created a dataframe which has "Reference" as one column and "Variation" as another. I want to plot a ROC curve based on these 2 columns. I have serached the R manual but I could not understand. Can anybody help me with the R code for plotting ROC curve. Thnx ashu6886 -- View this message in context:
2010 Apr 06
2
help in function in R akin to macro in SAS
Dear Whom it may concern, I need help to figure the "macro" function in R: I need to plot the different data sets by a plotxyf function, I want the title to be different for different data set. # get the data set final.xyf<- xyf(data=as.matrix(my.final), Y=classvec2classmat(final$outcome), xweight = 0.5, grid=somgrid(5, 4, "hexagonal")) #plot function
2010 Mar 30
1
predict.kohonen for SOM returns NA?
All, The kohonen predict function is returning NA for SOM predictions regardless of data used... even the package example for a SOM using wine data is returning NA's Does anyone have a working example SOM. Also, what is the purpose of trainY, what would be the dependent data for an unsupervised SOM? As may be apparent to you by my questions, I am very new to kohonen maps and am very grateful