similar to: question about rev

Displaying 20 results from an estimated 20000 matches similar to: "question about rev"

2005 May 30
3
how to "singlify" entries
hi netters I have a rather simple question. I have a data frame with two variables X and Y, both of which are factors. X has 100 levels while Y has 10 levels only. The data frame has 100 rows in all, so for X the values are unique, and Y has many replicate values. Now I wanna reduce the data frame into 10 rows only, according to the 10 levels of Y. I don't care which value of X is in
2007 Apr 24
2
(no subject)
I wanna display some data which there are subsets of a dataframe called "don" but there are errors like this > L=as.numeric(levels(factor(don$Id_Cara))) > for(i in L){ + donC(i)=subset(don, Id_Cara == i, select = c( Id_TrT1, Id_Geno, Id_Rep, Val_O)) + donC(i) + } Erreur dans donC(i) = subset(don, Id_Cara == i, select = c(Id_TrT1, Id_Geno, : impossible de trouver la
2003 Jul 16
1
bwplot does something weird with Hmisc library attached
Dear all I would like to ask you about possible bug in using bwplot (from lattice) together with Hmisc library attached. I found it in my actual data, but here is a toy example. It appears only when some levels are missing. library(lattice) library(Hmisc) # preparing data x1<-rnorm(10,5,1) x2<-rnorm(10,5,5) x3<-rnorm(10,1,1) x4<-rnorm(10,1,5) x<-c(x1,x2,x3,x4) x<-c(x,x+5)
2005 May 24
3
Reversing axis in a log plot (PR#7894)
Full_Name: Christian Marquardt Version: 2.1.0 OS: Linux (Redhat 9) Submission from: (NULL) (151.170.240.10) Following the advice of a reader of R-help, I would now like to submit this as a bug report: Say we have x = seq(1,3, by = 0.01) y = exp(x) Plotting and reversing linear axis is fine plot(x,y) plot(x,y, ylim = c(30,1)) as is a usual log-plot: plot(x,y, log =
2011 Aug 18
3
How to get the descriptive statistic of the whole dataframe?
Hi all: If I have a dataframe of N columns.If I wanna get the min(or max,or mean...etc)of the whole dataframe,how to do it quickly? What I can do is only: min(data[,1:ncol(data)]) Any other suggestion? Thanks! best [[alternative HTML version deleted]]
2009 Aug 19
5
scale or not to scale that is the question - prcomp
Dear all here is my data called "rglp" structure(list(vzorek = structure(1:17, .Label = c("179/1/1", "179/2/1", "180/1", "181/1", "182/1", "183/1", "184/1", "185/1", "186/1", "187/1", "188/1", "189/1", "190/1", "191/1", "192/1",
2018 Feb 12
2
plotting the regression coefficients
Hi Petr and Richard; Thanks for your responses and supports. I just faced a different problem. I have the following R codes and work well. p <- ggplot(a, aes(x=Phenotypes, y=Metabolites, size=abs(Beta), colour=factor(sign(Beta)))) + theme(axis.text=element_text(size = 5)) p1<-p+geom_point() p2<-p1+theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
2018 Feb 12
3
plotting the regression coefficients
Hi After melt you can change levels of your factor variable. Again with the toy example. > levels(temp$variable) [1] "y1" "y2" "y3" "y4" > levels(temp$variable) <- levels(temp$variable)[c(2,4,1,3)] > levels(temp$variable) [1] "y2" "y4" "y1" "y3" > And you will get graphs with this new levels ordering.
2018 Feb 12
0
plotting the regression coefficients
Petr, there was a thinko in your response. tmp <- data.frame(m=factor(letters[1:4]), n=1:4) tmp tmp$m <- factor(tmp$m, levels=c("c","b","a","d")) ## right tmp[order(tmp$m),] tmp <- data.frame(m=factor(letters[1:4]), n=1:4) levels(tmp$m) <- c("c","b","a","d") ## wrong tmp[order(tmp$m),] changing levels
2008 Jan 10
6
4 dimensional graphics
Dear all I want to display 4 dimensional space by some suitable way. I searched CRAN and found miscellaneous 3 dim graphics packages which I maybe can modify but anyway I am open to any hint how to efficiently display data like: longitude, latitude, height, value Thank you Petr Pikal petr.pikal at precheza.cz
2018 Feb 13
0
plotting the regression coefficients
Hi scale_colour_gradient(?red?, ?blue?) should do the trick. Actually I found it by Google ggplot colour http://www.cookbook-r.com/Graphs/Colors_(ggplot2)/ http://www.sthda.com/english/wiki/ggplot2-colors-how-to-change-colors-automatically-and-manually#gradient-colors-for-scatter-plots question. So you could find it too and probably far more quickly then myself as I have also other duties. Cheers
2003 May 20
3
plot POSIX class and identify
Hallo all just a small question I did not find an answer in help pages. Is it possible to use identify() after plotting with plot.POSIX to label points and/or to find out some points? Thanks a lot. Best regards Petr Pikal petr.pikal at precheza.cz p.pik at volny.cz
2007 Jan 05
4
Fast Removing Duplicates from Every Column
Hi, I'm looking for some lines of code that does the following: I have a dataframe with 160 Columns and a number of rows (max 30): Col1 Col2 Col3 ... Col 159 Col 160 Row 1 0 0 LD ... 0 VD Row 2 HD 0 0 0 MD Row 3 0 HD HD 0 LD Row 4 LD HD HD 0 LD ... ... LastRow HD HD LD 0 MD Now I want a dataframe that looks like this. As you see
2005 Nov 28
2
str and structable error
Hallo I encountered a behaviour which puzzles me (but finally I did get what I wanted). I used structable and strucplot but I wanted to change names of variables in structable object. I tried to subset it, use names but to no avail. So I tried str and expected to get a structure of an object but: > sss<-structable(Titanic) > str(sss) Error in "[.structable"(x, args[[1]],
2020 Oct 23
2
How to shade area between lines in ggplot2
Thank you, but this split the area into two and distorts the shape of the plot. (compared to ``` p + geom_abline(slope = slope_1, intercept = intercept_1 - 1/w[2], linetype = "dashed", col = "royalblue") + geom_abline(slope = slope_1, intercept = intercept_1 + 1/w[2], linetype = "dashed", col = "royalblue") ``` Why there
2004 Jun 09
5
"attach" in R corr. to Spus one
Hi, I am a newbie to R, just trying to switch from Splus. I am wondering to know if there is any such command in R as "attach" in Splus which can be used to attach the full directory. Also, any idea/referrence about, how to load c functions in R would be highly appreciated. Thanks, Utsav
2002 Jan 24
5
aggregate, by tapply
Dear R users I searched some sources but i did not find an answer.Please give me some hint to following problem. I would like to compute a summary statistic for some vector for different factor levels. I know I can use tapply or aggregate but I do not know if there is a way how to use function with several (two) variable input (like weighted.mean). I wrote a simple a function for factor
2006 Aug 24
2
my error with augPred
Dear all I try to refine my nlme models and with partial success. The model is refined and fitted (using Pinheiro/Bates book as a tutorial) but when I try to plot plot(augPred(fit4)) I obtain Error in predict.nlme(object, value[1:(nrow(value)/nL), , drop = FALSE], : Levels (0,3.5],(3.5,5],(5,7],(7,Inf] not allowed for vykon.fac > Is it due to the fact that I have unbalanced
2003 Nov 14
2
bad performance of a function
Dear all I need to find a length of true sequences in logical vector (see example 1). I found a possible solution which is good but if I use it on a larger data set I experience a substantial decrease in performance (example 2). Example 1 set.seed(111) x <- sample(c(T,F),50, replace=T) system.time(cetnost <- as.numeric(table(which(x)-cumsum(x[which(x)])))) [1] 0.00 0.00 0.03 NA NA
2005 Feb 09
2
[Fwd: Re: Fw: Contour plot]
Petr, It works perfectly! But I still have a question; I have fit the following data; x,y,z 1,10,11 2,11,15 3,12,21 4,13,29 5,14,39 6,15,51 7,16,65 8,17,81 9,18,99 10,19,119 >dat.lm <- lm(z~I(x^2)+y, data=dat) >dat.lm Call: lm(formula = z ~ I(x^2) + y, data = dat) Coefficients: (Intercept) I(x^2) y 1.841e-14 1.000e+00 1.000e+00 How do I create the