similar to: matrix multiplication

Displaying 20 results from an estimated 400 matches similar to: "matrix multiplication"

2017 Jul 13
2
about plotting a special case
Thanks, Jim. The code works, but I don't understand why you use q1090 <- quantile(DF1$B, probs=c()), rather than DF1$A? Also, how to add a legend for both points DF1 and DF2? On Wed, Jul 12, 2017 at 8:25 PM, Jim Lemon <drjimlemon at gmail.com> wrote: > Hi lily, > Here is the first plot: > > plot(DF1$A,DF1$B,pch=19,col="red") > meanA<-mean(DF1$A) >
2017 Jul 13
0
about plotting a special case
Hi lily, Here is the first plot: plot(DF1$A,DF1$B,pch=19,col="red") meanA<-mean(DF1$A) meanB<-mean(DF1$B) points(meanA,meanB,pch=18,col="red") q1090<-quantile(DF1$B,probs=c(0.1,0.9)) library(plotrix) dispersion(meanA,meanB,q1090[2],q1090[1], intervals=FALSE,col="red") The same code will work for a second data frame, except that you would use
2012 Feb 16
1
how to get r-squared for a predefined curve or function with "other" data points
hello mailing list! i still consider myself an R beginner, so please bear with me if my questions seems strange. i'm in the field of biology, and have done consecutive hydraulic conductivity measurements in three parallels ("Sample"), resulting in three sets of conductivity values ("PLC" for percent loss of conductivity, relative to 100%) at multiple pressures
2011 Oct 11
2
Creating the mean using algebra matrix
Dear all, I wanted to create the mean using a algebra matrix. so I tried this one: > meanAnimals <- new3%*%factorial (Calculates the matrix multiplication of the new3 * factorial). But I get the following error message: Error in new3 %*% factorial : non-conformable arguments These are my matrices: > new3 [,1] [,2] [1,] 1.350 8.1 [2,] 465.000 423.0
2012 Mar 07
5
Sampling problems
Hi, I need to sample randomly my dataset for 1000 times. The sample need to be the 80%. I know how to do that, my problem is that not only I need the 80%, but I also need the corresponding 20% each time. Is there any way to do that? Alternatively, I was thinking to something like setdiff () function to compare my 80% sample to the original dataset and obtain the corresponding 20%, unfortunately
2017 Jul 13
0
about plotting a special case
If you want colors mapped to the _values_ in DF1$C, there are a number of ways to do it: Color_unq<-color.scale(DF1$C,c(1,0),c(0,0,c(0,1)) This will produce colors from the lowest values (red) through the highest (blue). See the help page for color.scale to get different colors. With this you can use color.legend to add a mapping of the values and colors. If you just want different colors,
2017 Jul 13
2
about plotting a special case
Hi R users, I have a question about plotting. There is the dataframe below, while each row represents a record. If I want to plot on a A-B plot, i.e., x-axis represents A, while y-axis represents B values. However, I want to plot the mean value from records 1-10 as one point, while the 10th and 90th percentiles represent the error bars, such as one point in the attached example. I don't know
2011 Nov 07
4
rearrange set of items randomly
Dear all, I hope that this question is not too weird, I will try to explain it as good as I can. I have to write a function for a school project and one limitation is that I may not use the in built function sample() At one point in the function I would like to resample/rearrange the items of my sample (so I would want to use sample, but I am not allowed to do so), so I have to come up with sth
2011 Nov 02
1
problem with merging two matrices
Dear all, I hope you can forgive me my stupid questions, but I am a very new R user (; So, this is my question: I have two matrices, those are: matrix1 <- matrix(cbind(vector1, vector2), 1,2, dimnames = list(c("values"), c("T value", "p value"))) matrix2 <- matrix(dcbind,2,6,dimnames =
2011 Feb 23
1
factor() on a double vector
Hi, When 'x' is a vector of doubles, it's not clear how 'factor(x)' compares its values in order to determine the levels. For example, here all the values in 'x' are "conceptually" the same: x <- c(11/3, 2/3 + 4/3 + 5/3, 50 + 11/3 - 50, 7.00001 - 1000003/300000) However, due to machine rounding errors, they are not
2010 Apr 05
3
bootstrap confidence intervals, non iid
hello, i need to calculate ci's for each of 4 groups within a dataset, to be able to infere about differences in the variable "similarity". the problem is that data within groups is dependent, as assigned by the blocking-factor "site". my guess was to use a block bootstrap but samples within in these blocks / sites are not of same length. i was not able to find a method to
2011 Oct 24
1
Using predicted() in R
Dear all, I am a R user since about 3 weeks now and still struggeling with things that must be very easy for you... This week I am struggling with the function predict() I want to use this function to get a 95% interval. I understand that you have to use it in such a way as: lm_examplemodel<- lm(y~x1 + x2 + x3) newdata <- data.frame(x1 = ???, x2 = ???, x3 = ???)
2011 Oct 03
1
Assigning factor names to interaction plot
Hi everyone, I have the following problem: I have three variables, 'group', 'city' and 'pressure' There is an interaction effect between group and city and I'd like to show this in an interaction plot: interaction.plot(group, city, pressure, type="b", col= c(1:2), leg.bty="o", leg.bg="blue", lwd=1,
2010 Aug 07
1
Data frame reordering to time series
Given a data frame, or it could be a matrix if I choose to. The data consists of an ID, a year, and data for all 12 months. Missing values are a factor AND missing years. Id<-c(rep(67543,4),rep(12345,3),rep(89765,5)) Years<-c(seq(1989,1992,by =1),1991,1993,1994,seq(1991,1995,by=1)) Values2<-c(12,NA,34,21,NA,65,23,NA,13,NA,13,14) Values<-c(12,14,34,21,54,65,23,12,13,13,13,14)
2011 Nov 23
2
avoiding the sample in built function
Dear all, I am currently working on a function in which I would like to avoid using the command sample(). Therefore, I am now trying to make a for loop that does the same thing as the in built function sample does: Rearranging the items of a object randomly. So, the output I want to you get is the same as sample() would give me: e.g.: data <- c(5,4,6,7,8) sample(data) > data <-
2013 Mar 07
1
create vector from indices interpolated values
Readers, Is it possible to create a plot command based upon the indices of missing values in a data set? dataset1<-read.table(text=' 10 2 20 NA 30 5 40 7 50 NA 60 NA 70 2 80 6 90 NA 100 9 ') dataset2<-read.table(text=' 0.2 0.4 0.1 0.9 0.2 0.3 1.1 0.7 0.9 0.6 0.4 ') The 'approx' function is used to obtain the interpolated values for 'NA' in dataset1.
2011 Nov 04
6
Matrix element-by-element multiplication
is there a way to do element-by-element multiplication as in Gauss and MATLAB, as shown below? Thanks. --- a 1.0000000 2.0000000 3.0000000 x 1.0000000 2.0000000 3.0000000 2.0000000 4.0000000 6.0000000 3.0000000 6.0000000 9.0000000 a.*x 1.0000000 2.0000000 3.0000000 4.0000000
2006 Oct 18
6
new R-user needs help
Dear all, I have a dataset Exp name id x1 x2 x3 x4 x5 1 a 1 23 24 23 22 30 1 b 2 25 26 27 23 24 1 c 3 32 19 23 25 28 2 a 4 28 32 24 26 27 2 b 5 23 24 25 26 28 2 c 6 23 31 30 38 23 3 a 7 24 25 31 27 29 3 b 8 28 25 26 32 28 3 c 9 21 31 28 23 29 where each name a,b and c is repeated three times. Now I want to calculate the the averages of
2013 Mar 29
1
Dataframe manipulation
Hi Adam, I hope this is what you wanted: dat1<- read.csv("example.csv",sep="\t",stringsAsFactors=FALSE) ?str(dat1) #'data.frame':??? 102 obs. of? 5 variables: # $ species? : chr? "B. barbastrellus" "E. nilssonii" "H. savii" "M. alcathoe" ... # $ period?? : chr? "dusk" "dusk" "dusk"
2013 Jul 17
0
usar partial=TRUE en rake
Estimados usuarios de R: Estoy usando un programa en que utilizo la funciĆ³n rake: *rake(ps,list(~A,~B,~C),list(pop.A, pop.B, pop.C),control = list(maxit=1000, epsilon = 1, verbose=TRUE))* ** *Obtengo como resultado:* ** , , C = 1 B A 1 2 3 4 5 A1 0.000000 0.000000 0.000000 0.000000 0.000000 A2 3.000000 3.000000 0.000000