similar to: help in conditional histogram

Displaying 20 results from an estimated 10000 matches similar to: "help in conditional histogram"

2010 Apr 07
2
label the bars by the percentage values in the conditional histogram?
HI, Dear R-community: I have the following codes to plot the conditional histogram, is a way to label the bars by the percentage values in the conditional histogram? 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)
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 Apr 07
1
help in histogram
x<- sample(1:14, 319, rep=T) hist(x, freq=F, xlab='',ylab="Percent of Total", col="skyblue", labels=TRUE, right=FALSE,main="Position of Hypothetical Protein") Is there is way to round the labels to 2 decimal digits, for example, 0.088 is changed to 0.09. Thanks! -- Sincerely, Changbin -- [[alternative HTML version deleted]]
2010 Apr 06
2
help output figures in R
somfunc<- function (file) { aa_som<-scale(file) final.som<-som(data=aa_som, rlen=10000, grid=somgrid(5,4, "hexagonal")) pdf(file="/home/cdu/changbin/file.pdf") #output graphic file. plot(final.som, main="Unsupervised SOM") dev.off() } I have many different files, if I want output pdf file with the same name as for each dataset I feed to the function
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 Apr 06
1
help with "macro" in R
library(lattice) hisfunc<- function (vari) { histogram(~ vari|target, data=total, type="count", layout=c(1,3), labels=TRUE, main="Histograms by target", col="skyblue") } hisfunc(total$acid) HI, guys, I am using the hisfunc to get histograms for different variables, for the title of the histogram, I want to have different name for each variable. how can I DO ?
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 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 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
2012 Nov 16
1
polycor package
I am currently working with R's polycor package and I have encountered a problem. I tried to follow the steps as outlined in the sem.pdf file where a CFA model is run using polychoric correlations. Every time I run the command sem(model, data, N=.), I get the following warning message: Warning message: In if (orthogonal) { : the condition has length > 1 and only the first element will be
2010 Jun 24
1
help in SVM
HI, GUYS, I used the following codes to run SVM and get prediction on new data set hh. dim(all_h) [1] 2034 24 dim(hh) # it contains all the variables besides the variables in all_h data set. [1] 640 415 require(e1071) svm.tune<-tune(svm, as.factor(out) ~ ., data=all_h, ranges=list(gamma=2^(-5:5), cost=2^(-5:5)))# find the best parameters. bestg<-svm.tune$best.parameters[[1]]
2004 Dec 15
3
adding perspectives to existing persp plots
I've created a perspective plot using 'persp' in the graphics package. I'd like to add a second plane of z values to the existing plot, but I cannot seem to do this using 'persp'. Is there an analogue to 'lines' or 'points' for perspectives? Corey. corey.bradshaw at cdu.edu.au
2008 Aug 05
1
xyplot key issue - line colors
I have a problem regarding the colors assigned to the lines in the key to an xy plot. I specify the plot like this: xyplot(numbers~sqrt(breaks)|moltype+disttype, groups = type, data = alldata, layout = c(3,2), type = "l" , lwd = 2, col = c("gray", "skyblue"), key = simpleKey(levels(alldata$type), points = FALSE, lines = TRUE, columns = 2, lwd = 2,
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 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 10
3
Lattice, combine histogram and line graph
Hello everyone, I have a simple histogram of gasoline prices going back a few years that I want to insert a line graph of consumer price index (cpi) over the histogram. I have looked through the "Lattice" book by Deepayan Sarkar but don't see anything there. How might this be done? An example would be wonderful. Current code snippet follows. For example additional field to add
2010 Apr 29
1
variable importance in Random Forest
HI, Dear Andy, I run the RandomFOrest in R, and get the following resutls in variable importance: What is the meaning of MeanDecreaseAccuracy and MeanDecreaseGini? I found they are raw values, they are not scaled to 1, right? Which column if most similar to the variable rel.influence in Boosting? Thanks so much! > fit$importance 0 1
2010 Apr 29
2
can not print probabilities in svm of e1071
> x <- train[,c( 2:18, 20:21, 24, 27:31)] > y <- train$out > > svm.pr <- svm(x, y, probability = TRUE, method="C-classification", kernel="radial", cost=bestc, gamma=bestg, cross=10) > > pred <- predict(svm.pr, valid[,c( 2:18, 20:21, 24, 27:31)], decision.values = TRUE, probability = TRUE) > attr(pred, "decision.values")[1:4,]
2018 Jan 12
1
shading (fill) the area between two lines
Dear All: I am trying to shade the area between the two lines; *line 1* and *line 2*. You can use this code as an example. x100<-c(-1,1,2,3,4,5,6,3) y100<-c(4,5,3,1,4,4,2,-1) plot(x100,y100) *##### line1* abline(a=-(Beta0-1)/Beta[1,2], b=-Beta[1,1]/Beta[1,2], lwd = 3, col="skyblue", lty=3) ##### lty=3, *##### line 2* abline(a=-(Beta0+1)/Beta[1,2],
2008 Oct 20
2
pass longer arguments to adj of text()
Hi, text()'s pos does handle more dimensional labels, while adj does not - or how can I pass an array to text() and use the adj argument (skyblue text)? plot(-1:1,-1:1) text(c(0,0),c(0,0),c("a","b"),pos=c(1,2),col="red") text(c(0,0),c(0,0),c("a","b"),adj=cbind(c(1,2),c(1,1)),col="skyblue") Thomas