similar to: Strange behaviour of cbind

Displaying 20 results from an estimated 30000 matches similar to: "Strange behaviour of cbind"

2011 Nov 10
2
library(qpcR) cbind.na
I want to use function cbind.na at library(qpcR) I install package qpcR and I can use functions such m1 <- pcrfit(reps, 1, 2, l5) > AICc(m1) [1] -102.5843 but when i try cbind.na(1, 1:7) i take message Error: could not find function "cbind.na" Thanks -- View this message in context: http://r.789695.n4.nabble.com/library-qpcR-cbind-na-tp4023339p4023339.html Sent from the
2011 Jun 04
3
cbind 3 or more matrices
How can I cbind three or more matrices like A,B and C. This does not work: cbind(A,B,C) -- Thanks, Jim. [[alternative HTML version deleted]]
2017 Dec 04
1
problem with the behaviour of dashed lines in R plots
hi Sarah, Thanks a lot for having taken time to answer me and for your reply. I wonder how I missed this solution. Indeed plotting the line with the 2 extreme data points works perfectly. Best, Jean-Philippe Fontaine On 04/12/2017 18:30, Sarah Goslee wrote: > It's because you are plotting a line between each of the points in > your data frame, and they are very close togethe
2017 Dec 04
3
problem with the behaviour of dashed lines in R plots
dear R users, I am performing a linear regression with lm, and I would like to plot the regressor in dashed lines. I know that the lty=2 option is the way out, but it has a very strange behaviour: the line starts dashed but then the spaces between each dash becomes very tiny and so the line become somehow continuous for the human eye. Do you know how to fix that problem, in order to have a
2012 May 30
5
problem with ifelse
Dear all, ?The code below is used to generate interval censored data but unfortunately there is an error with the ifelse which i am not able to rectify. ?Can somebody help correct it for me. Thank you t<-rexp(20,0.2)? v<-c(0,m,999)? y<-function(t,v){ ? z<-numeric(length(t (( ? ? s<-numeric(length(t (( ? ? ? for(i in 1:length(t)){ ? ? ? ? for(j in 1:length(v-1))? ? ? ? ? { ifelse
2011 Dec 12
3
Variables from a Dataframe
Hello everyone, I want make a variable selection  from a dataframe, but when I build this new object (using cbind) the new table (which is a matrix) I lost all the original factor names in the variables. I get 1,2,3.... Someone would be so kind and tell me if there's is a ny way to get variables in a dataframe, but not changing these factor to numbers? Thank you all. José [[alternative
2008 Dec 11
5
Row order in plot
I'm new to R so forgive me if this seems like a simple question: So I have table where the row titles are string variables. When I plot the data with rows along the x-axis, the data is ordered alphabetically as opposed to the order of the table. How can I preserve the row order of the table in the plot? Thanks in advance. -- View this message in context:
2011 Aug 01
1
Inserting column in between -- "better" way?
Folks: I consider my reply below rather clumsy: One has to keep track of index numbers other than that which is inserted and must separately change column names. Is there as "essentially better" way to do this, either via base R or via an R package. I leave it to you to define "essentially better." Thanks. Cheers, Bert On Mon, Aug 1, 2011 at 10:17 AM, Bert Gunter
2017 Dec 04
0
problem with the behaviour of dashed lines in R plots
Hi, It's because you are plotting a line between each of the points in your data frame, and they are very close together: > cbind(df1$B,predict(regressor,df1)) [,1] [,2] 1 1.410832 -13.96466 2 1.589383 -15.21169 3 1.446662 -14.21491 4 1.488665 -14.50826 5 1.487035 -14.49687 6 1.497347 -14.56890 7 1.458070 -14.29458 8 1.568134 -15.06328 9 1.543364 -14.89029 10 1.513473
2023 Oct 24
2
How to Calculate the Mean by Multiple Groups in R
Hi, I think you're misunderstanding which set of variables go on either side of the formula. Is this what you're looking for? > aggregate(OD ~ Time + Target + Conc, data = df, FUN = "mean") Time Target Conc OD 1 1 BACT 1 765.3333 2 1 BACT 2 745.3333 3 1 BACT 3 675.0000 > aggregate(ODnorm ~ Time + Target + Conc, data = df, FUN =
2011 Jan 31
4
Select rows with distinct values in a column and other conditions
My data frame looks like: SightingID PA1 PA2 PlotID InOverlap Area1 2001 1 -99 392 Y 0.22 2002 1 -99 388 Y 0.253 2008 1 NA 104 N 0.344 2010 1 NA 71 N 0.185 2012 1 NA 61 N 0.166 2013 1 NA 61 N 0.227 2014 1 NA 62
2008 May 22
1
setting specific colours for different groups of points on a scatter plot
Hi, I have a table with three columns of data, let's call these a, b and c. I have produced a scatter plot of a against b, but I would like to colour the points according to their corresponding c values. c takes the value of either 0,1,2,3 or 4 and so I would like to colour all of the points with a c value of 0 one colour, all those with a c value of 1 another colour etc. When I use
2010 Mar 23
2
Adding matrix rows that have the same name?
Does anyone know if there is an R function that will take a matrix like this jim 1 0 0 0 0 0 jim 0 1 0 0 0 0 jim 0 0 1 0 0 0 bob 1 0 0 0 0 0 bob 0 0 1 0 0 0 harry 0 0 1 0 0 0 harry 0 0 0 1 0 0 harry 0 0 0 0 1 0 harry 0 0 0 0 0 1 and make it like this? (that is, add together rows that have the same name?) jim 1 1 1 0 0 0 bob
2012 Mar 06
3
Label rows of table by factor level for groups of factors
Dear useRs, I am sure this is a fairly simple problem, but I just cannot get my head around it. I have a dataframe which contains several factor variables. I can use table() to tell me how many different combinations there are of these variables. What I should like to do is to add a column to my original dataframe which labels each row according to the unique combination of factors. E.g. in
2012 Mar 28
2
How to create arbitrary number of loops
Dear R users, I'm wondering how I can generate an arbitrary number of loops in R. For instance, I can generate two "for" loops to get ICC among any two-way combination among 10 variables. Here is the code n<-10 for (i in 1:(n-1)) { for (j in (i+1):n) { icc(cbind(DATA[,i],DATA[,j])) } } If I need three-way combination, then a code with three "for" loops will be:
2023 Oct 24
1
How to Calculate the Mean by Multiple Groups in R
Also, > aggregate(cbind(OD, ODnorm) ~ Time + Target + Conc, data = df, FUN = "mean") Time Target Conc OD ODnorm 1 1 BACT 1 765.3333 108.33333 2 1 BACT 2 745.3333 88.33333 3 1 BACT 3 675.0000 18.00000 (You might wish for "cbind(OD,ODnorm) ~ . - Well", but aggregate.formula is not smart enough for that.) -pd > On 24 Oct 2023, at
2009 Nov 24
5
Split column
Hello, R users, I have a dataset that looks like this: id var1 var2 1 1 3 2 3 1 3 2 1 4 1 2 5 2 3 I want to split one column to two columns with 1 = 1 and 1, 2 = 1 and 2, 3 = 2 and 2: id var1.1 var1.2 var2.1 var2.2 1 1 1 2 2 2 2 2 1 1 3 1 2
2012 Mar 07
4
add data from .RData file
I got two .RData file e.g data.2005.RData & data.2006.RData I would like to combine these two different data set and make single RData file. in both file there are some NULL files are also available and I would like to clear this NULL files also. $ : NULL $ : NULL $ : num [1:43285, 1:8] -21.1 -21.1 -24.9 -24.9 -24.9 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL ..
2013 Jul 23
1
Heat Map for species - code from Numerical Ecology with R
Hello, I am relatively new to R and I am working through the code that is provided in the book Numerical Ecology with R and I have run across an error message that I can't seem to figure out. I am using the vegan, ade4, gclus and cluster packages. The code is as follows: # Ordered community table # Species are ordered by their weighted averages on site scores or <- vegemite(spe,
2012 Feb 24
2
data frame manipulation with condition
Dear list, n00b question, but still can't find any easy answer. Here is a df: > df<-data.frame(cbind(x=c("AA","BB","CC","AA"),y=1:4)) > df x y 1 AA 1 2 BB 2 3 CC 3 4 AA 4 I want to modify this df this way : if df$x=="AA" then df$y=df$y*10 if df$x=="BB" then df$y=df$y*25 and so on with other conditions. TY for any