search for: 3,4

Displaying 20 results from an estimated 617 matches for "3,4".

Did you mean: 1,4
2011 Nov 08
4
Intervals in function cut
When I was studying the function cut I found this example: > x <- rep(0:8, tx0) > x [1] 0 0 0 0 0 0 0 0 0 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 4 4 4 5 5 5 5 5 5 5 5 5 5 6 [39] 6 6 6 6 7 7 7 8 8 8 8 8 > cut(x, b = 8) [1] (-0.008,0.994] (-0.008,0.994] (-0.008,0.994] (-0.008,0.994] (-0.008,0.994] [6] (-0.008,0.994] (-0.008,0.994] (-0.008,0.994] (-0.008,0.994] (0.994,2] [11] (0.994,2] (0.994,2] (0.994,2] (2...
2009 Aug 25
1
Filling in empty arrays/lists from using "paste" function
Dear R users, I am trying to fill in arrays (5 different according to distinct "id") from objects produced from arbitrary data set below. a <- data.frame(id=rep(c("idA1","idA2","idA3","idA4","idA5"),2),pro=c("bb","uu","ee","tt","uu","gg","tt","bb","gg","ee"),sal=rpois(10,2)) id pro sal 1 idA1 bb 2 2 idA2 uu 0 3 idA3 ee 3 4 idA4 tt...
2018 May 30
4
par(mfrow=c(3,4)) problem
Hi all; I need to put 12 different plot2 into the same matrix. So my array for the matrix will be par(mfrow=c(3,4)). I am running ggplot2 to produce my 12 plots. For some reason, par(mfrow=c(3,4)) did not turn out 3*4 matrix. my basic R codes for each plot is par(mfrow=c(3,4)) library(ggplot2) p <- ggplot(a, aes(x=Genotypes, y=Plant_hight, size=Plant_hight, color=Showing_rate)) + . . Best regards, Gre...
2018 May 30
0
par(mfrow=c(3,4)) problem
Hi, You're mixing base plot and ggplot2 grid graphics, which as you've discovered doesn't work. Here's av strategy that does: https://cran.r-project.org/web/packages/egg/vignettes/Ecosystem.html This vignette has a good overview, well as info specific to that package. Sarah On Wed, May 30...
2003 Sep 19
4
newby problem - concatenate lists
Hi, a very basic question: What ist the easiest way in R to concatenate two lists of vectors? E.g, I have x<-list(c(1,2)) y<-list(c(3,4)) and I want to receive list(c(1,2),c(3,4)) thank you! Axel ________________________________________ Fraunhofer Institut fuer Arbeitswirtschaft und Organisation (IAO) Dipl. Inf. Axel Benz Nobelstr. 12 D-70569 Stuttgart Germany Tel. +49(0)7119702289 Fax. +49(0)7119702192 mail: mailto:axel.benz@i...
2009 Sep 25
2
Letra cursiva en legend()
Buenas tardes para todos, Consideren la siguiente gráfica: # Algunos datos set.seed(123) D <- matrix(rnorm(100), ncol = 2) # Gráfico matplot(D, type = ''l'', lty = 1, col = c(3,4), las = 1, xlab = "Observación", ylab = ''Valores'') # Leyenda legend(''topleft'', c(''A1'',''A2'')...
2013 Jan 11
3
split & rbind (cast) dataframe
Hi, I would like to split dataframe based on one colum and want to connect the two dataframes by rows (like rbind). Here a small example: # The orgininal dataframe df1 <- data.frame(col1 = c("A","A","B","B"),col2 = c(1:4), col3 = c(1:4)) # The datafame how it could look like df2 <- data.frame(A.col2 = c(1,2), A.col3 = c(1,2), B.col2 = c(3,4), B.col3 = c(3,4)) I think I already did a similar procedure sometime ago with the cast() command from reshape-package but I cant remember correctly... ...maybe someone can point...
2014 Jun 23
2
Unfixed bugs in latest R-patched
...rg/NEWS.txt): o The documentation for c now says how the names for the result are determined, including previously missing information on the use.names argument, and on the role of the names of arguments in the call of c. This documentation is missing in R-2.15.0 and R-3.1.0. o The documentaton for diag now documents that a diagonal matrix is always created with type double or complex, and that the names of an extracted diagonal vector are taken from a names attribute (if present), if not from the row and column names. This information...
2007 Feb 21
3
Different gridlines per panel in xyplot
...is that each panel has different y-ranges (in my real example the y-ranges and y-intervals are even more different). For example, I wish I could use the yScale list as the h parameter in abline, but it does not work with a list. Thanks for any help. Rene library(lattice) Subj <- rep(1:4,each=3) Time <- rep(1:3,4) + 0.1 Conc <- (1:12) + 0.1 df <- data.frame(Subj,Time,Conc) xScale <- 1:3 yScale <- list(1:3,4:6,7:9,10:12) xyplot(Conc ~ Time | Subj, data = df, layout = c(2,2), type="b", scales=list( x=list(at=xScale), y...
2009 Jul 30
4
truncating values into separate categories
...th the last category("4") representing values >=4(hence 4:max(NP)). The problem is that R is reading max(NP) as multiple values instead of range so the lengths of the labels and the breaks are not matching. Suggestions? Per <- c("NA", "1", "2", "3","4") NP=c(1 ,1 ,2 ,1, 1 ,2 ,2 ,1 ,4 ,1 ,0 ,5 ,3 ,3 ,1 ,5 ,3, 5, 1, 6, 1, 2, 2, 2, 4, 4, 1, 2, 1, 3, 3, 1 ,2 ,2 ,1 ,2, 1, 2, 2, 3, 1, 1, 4, 4, 1, 1, 1, 2, 2, 2) Person_CAT <- cut(NP, breaks=c(0,1,2,3,4:max(NP)), labels=Per) -- View this message in context: http://www.nabble.co...
2003 Mar 04
3
question on latticeParseFormula (PR#2602)
...ParseFormula works the way I anticipated for factor, but not for ordered. I want the behavior I see with tmp2, but not with tmp. My next step is to use the right.name to isolate the tmp2[,c("a","b")] columns. tmp <- data.frame(y=(1:12)+.1, a=factor(rep(1:3,4)), b=ordered(rep(1:4, c(3,3,3,3)))) latticeParseFormula(as.formula(y ~ a + b), data=tmp) tmp2 <- data.frame(y=(1:12)+.1, a=factor(rep(1:3,4)), b=factor(rep(1:4, c(3,3,3,3)))) latticeParseFormula(as.formula(y ~ a + b), data=tmp2) > ver...
2007 Oct 22
1
question on axis box with asp=1
I've been using (and loving) R for quite a while now, but I have to admit that something simple is still stumping me. The question is how I can control the box within which a plot is drawn, in cases where I'm controlling the aspect ratio with the "asp" argument. The problem com...
2009 Sep 15
2
How to remove 'NA's?
Hi, > match(c(3,4), c(3,2,1)) [1] 1 NA The above result has 'NA' in. Is there a way to make 'match' does not produce any 'NA's? Regards, Peng
2007 Jan 16
0
patch to enable ssh use sock fd 3,4
Hi all I was thinking maybe other ppl need this small hack :) So ssh supports ProxyCommand which use a separate proccess for in/out chans to remote sshd. But sometimes this extra proc is not desired but ssh should use a specific socket (in below patch is fd 3 and 4) for same thing.. For example a reverse ssh connection where sshd connects back to ssh(which is executed by a a script that binds to the port then execute ssh: on sshd side: $ nc -w 60 -c '/usr/sbin/sshd -i' ssh_host 12345 on ssh side: #!/usr/bin/perl use Socket qw(:all); our $bi...
2011 Feb 10
2
Calling symbols from dataframe for xyplot
Hello, I am trying to make a xyplot plot with points that are different symbols. I want to call the symbol type (pch) from a column in my dataframe. Here is a simplified example. In my real example I also have groups, which I have not included here. This example doesn't change the symbols or colors. Any help you can provide would be appreciated. Thanks, John x<-c(1:12) y<-c(rpois(12,4)) grp<-c(rep(c(3,4), each=6)) z<-c(rep(c(1,2), each=6)) p<-rep(1:3,4) xyplot(y~x|z, cex=1.2, panel=function(x,y,...){ panel.xyplot(x,y,...)...
2008 Jul 10
1
S4 class questions
Hi, I'd like to create a S4 class contains only one type of data. However, the number of slots varies. For example, I want to create a class "a", each slots in "a" contains numeric value only. > setClass("a", contains = "numeric") If I want to cre...
2015 May 14
3
comportamiento de data.table al hacer calculos por grupos
...e ayuden mucho en la web. Estoy haciendo calculos por grupos con data,table. Tengo un archivo (zp.res) con tres columnas que clasifican los datos (sol, con, dia) y una columna de datos numericos (media), de la siguiente forma: sol con dia media 1: con 0 1 -22.6 2: con 0 1 -36.6 3: con 0 1 -35.6 y quiero calcular el promedio de "media" (la col 4) agrupando con las variables sol,con,dia. Lo hago de la siguiente forma: med <- zp.res[, mean(media), by="sol,dia,con"] cuando reviso "med" esta todo bien, se han calculado las medias...
2008 Jul 22
2
F test
Dear R users,   I need to do a F test on the hypothesis that a 2 by 1 vector (X_1, X_2)' has the mean vector  (M_1, M_2)'. Specifically, I would like to assume the X vector comes from a bivariate Normal distribution (M, Sigma). Then, given 1000 observations on X, I wanted to test if the means of X agree with the means of the target Normal distribution. Any function or package in...
2002 Jan 15
1
labels returned by cut() when include.lowest=T (PR#1263)
Full_Name: Stephen Eglen Version: 1.4 OS: Redhat Linux 7.1 Submission from: (NULL) (128.252.204.36) I think the brackets in the levels of cut() are slightly incorrect when include.lowest is TRUE. For example: > table(cut( c(1,4), include.lowest=T, right=F, breaks=c(1,2,3,4))) [1,2) [2,3) [3,4) 1 0 1 I think the last range in this case should be [3,4]. A similar problem e...
2011 Aug 28
2
[LLVMdev] cortex-m{3,4} special registers
I was attempting to compile some code with a recent (r138716) version of llvm/clang, targeting a cortex-m4 processor. And I get an error like this: CC: sched_garbage.c In file included from sched_garbage.c:43: In file included from ./os_internal.h:48: In file included from /p/nuttx/trunk/nuttx/include/sched.h:47: In file included from /p/nuttx/trunk/n...