similar to: is member

Displaying 20 results from an estimated 30000 matches similar to: "is member"

2012 Mar 10
2
Window on a vector
Dear all, I have a large vector (lets call it myVector) and I want to plot its value with the logic below yaxis<-myVector[1] yaxis<-c(xaxis,mean(myvector[2:3]) yaxis<-c(xaxis,mean(myvector[4:8]) yaxis<c(xaxis,mean(myvector[9:16]) yaxis<c(xaxis,mean(myvector[17:32]) this has to stop when the new ..... yaxis<c(xaxis,mean(myvector[1024:2048]) will not find the correspondent number
2010 Nov 18
3
Sample covariance matrix in R
Hello everyone. I would like to find the sample covariance matrix using R. So far I read on the wikipedia what a sample_covariance is http://en.wikipedia.org/wiki/Sample_covariance according to wikipedia one vector is enough to calculate the sample covariance matrix. In R I tried cov(myvector) and I get the reply that I need to pass either two argument or one matrix with x,y values . How can I
2012 Mar 24
1
plotting with line types... bit confusing
Dear all, I would like to print an empirical cdf on a vector I have while the plot(ecdf(myVector)) works great when I try to specify the line type to be a line (I get points) with plot(ecdf(myVector),type="lines") Error in plot.default(NA, NA, type = "n", xlim = xlim, ylim = ylim, xlab = xlab,  :   formal argument "type" matched by multiple actual arguments I get
2009 Nov 24
4
Method
Hello, i would like to ask you another question. Is exist anymethod to vectors that tells me the last element?That is to say,I have a vector, I want to return the position of last element. I hope having explained. A greeting, Ignacio. -- View this message in context: http://old.nabble.com/Method-tp26493442p26493442.html Sent from the R help mailing list archive at Nabble.com.
2012 Mar 22
2
Create weird type of sequences
Dear all, I would like to create the following sequence of numbers 1 2 2 3 3 3 3 4 4 4 4 4 4 4 4 and so on (actually I double the number of same elements).... the reason is that I want then to feed the sequence above to  tapply(myVector, weirSeq, FUN = mean) and then average over those... Could you please provide some guidance how I can create such a sequence in R? Regards Alex
2011 Jun 22
2
strange date problem - May 3, 1992 is NA
> is.na(strptime("5/2/1992", format="%m/%d/%Y")) [1] FALSE > is.na(strptime("5/3/1992", format="%m/%d/%Y")) [1] TRUE Any idea what's going on with this? Running strptime against all dates from around 1946, only 5/3/1992 was converted as "NA". Even stranger, it still seems to have a value associated with it (even though is.na thinks
2011 Oct 30
3
why the a[-indx] does not work?
Dear all, Could you please explain me why > OverloadsTesT [1] 1 0 1 0 0 0 0 0 0 0 > a<-matrix(data=seq(1,10),nrow=10) > a [,1] [1,] 1 [2,] 2 [3,] 3 [4,] 4 [5,] 5 [6,] 6 [7,] 7 [8,] 8 [9,] 9 [10,] 10 > a[-OverloadsTesT] [1] 2 3 4 5 6 7 8 9 10 the last line does not remove the first and third element and only does the first element.? What I
2012 May 04
3
read-in, error???
Dear Users! I encountered with some problem in data reading while I challenged R (and me too) in a validation point of view. In this issue, I tried to utilize some reference datasets ( http://www.itl.nist.gov/div898/strd/index.html). And the result departed a bit from my expectations. This dataset dedicated to challenge cancellation and accumulation errors (case SmLs07), that's why this
2010 Aug 26
5
Quick GREP challenge
> grep("f[0-9]+=", "f1=5,f22=3,", value = T) [1] "f1=5,f22=3," How do I make the line output c("f1", "f22") instead? (Actually, c(1,22) would be even better). Thank you. -- View this message in context: http://r.789695.n4.nabble.com/Quick-GREP-challenge-tp2339486p2339486.html Sent from the R help mailing list archive at Nabble.com.
2013 Aug 27
1
R Language Newbie
Hi, set.seed(29) myVector<- rnorm(100) ?seq(1,100,by=2) # [1]? 1? 3? 5? 7? 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 #[26] 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 myVector[seq(1,100,by=2)] rev(myVector) ?sum(myVector>0) #[1] 46 #or ?table(myVector>0) # #FALSE? TRUE ?#? 54??? 46 A.K. Hey guys, this is my first week
2012 Nov 20
2
Ordering List Items Chronologically
Dear colleagues, Is there a way to order list items by date? I have a series of surveys in a list where the name of each list item is the date the survey was taken but the list items are out of order. Each data frame has a variable in it with the survey date as well, if that helps. Yours, Simon Kiss #Sample Data mylist<-list('1991-01-01'=data.frame(a=rep(5,5),
2012 Mar 16
3
Faster way to implement this search?
I am working on a simulation where I need to count the number of matches for an arbitrary pattern in a large sequence of binomial factors. My current code is for(indx in 1:(length(bin.05)-3)) if ((bin.05[indx] == test.pattern[1]) && (bin.05[indx+1] == test.pattern[2]) && (bin.05[indx+2] == test.pattern[3])) return.values$count.match.pattern[1] =
2012 Mar 01
4
problem with sum function
Hi! I'm running R version 2.13.0 (2011-04-13) Platform: i386-pc-mingw32/i386 (32-bit) When i type in the command: sum(c(-0.2, 0.8, 0.8, -3.2, 1.8)) R returns the value: -5.551115e-17 Why doesn't R return zero in this case? There shouldn't be any rounding error in a simple sum. Thanks, Mark
2007 Dec 18
6
All anchored series from a vector?
>From: Johannes Graumann <johannes_graumann at web.de> >Date: 2007/12/18 Tue PM 04:40:37 CST >To: r-help at stat.math.ethz.ch >Subject: [R] All anchored series from a vector? lapply(1:length(myvector) function(.length) { c(myvector[1}:myvector[.length]) }) but test it because i didn't. >Hi all, > >What may be a smart, efficient way to get the following result:
2012 Mar 19
3
where this Error comes from?
Dear all, While I am executing my code I receive the error below Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...) :   'x' must be atomic the weird thing that I am not calling anywhere sort function nor do I rely on anyh sorting. How I can discover where this comes from (inside which function?). I would like to thank you in advance for your help B.R Alex
2012 Feb 02
4
The "less than" (<) operator doesnt seem to perform as expected
The example here puzzles me. It seems like the < operator doesn't work as expected. > l <- 0.6 > u <- seq(0.4, 0.7, 0.1) > u [1] 0.4 0.5 0.6 0.7 > mygrid <- expand.grid("l" = l, "u" = u) > mygrid l u 1 0.6 0.4 2 0.6 0.5 3 0.6 0.6 4 0.6 0.7 > mygridcollapsed <- mygrid[mygrid$l < mygrid$u, ] > mygridcollapsed l u 3 0.6 0.6 4
2011 Oct 03
2
Merge two data frames and find common values and non-matching values
Hi, I am trying to find a function to match two data frames of different lengths for one field only. So, for example, df1 is: Name Position location francesca A 75 cristina B 36 And df2 is: location Country 75 UK 56 Austria And I would like to match on "Location" and the output to be something like: Name Position Location Match francesca A 75 1 cristina B 36 0 I have tried with
2009 May 07
1
paste with apply, spaces and NA
Hello everyone, I've come up with a problem with using paste() inside apply() that I can't seem to solve. Briefly, if I'm using paste to collapse the rows of a data frame, AND the data frame contains strings with spaces, AND there are NA values in subsequent columns, then paste() introduces spaces. This only happens with that particular combination of data values and commands. I have
2012 Dec 14
5
A question on list and lapply
Dear all, let say I have following list: Dat <- vector("list", length = 26) names(Dat) <- LETTERS My_Function <- function(x) return(rnorm(5)) Dat1 <- lapply(Dat, My_Function) However I want to apply my function 'My_Function' for all elements of 'Dat' except the elements having 'names(Dat) == "P"'. Here I have specified the name
2012 Feb 02
2
Problem with range()
Hello, I'm using range do define boundaries for a linear model, so the line I graph is only graphed for the range of data. There are NAs in the data, but I dont remember this being a problem before. I typed na.action=na.omit anyway, which has usually solved any NA issues in the past. Any idea why R cant do vector functions for these data? Solution? Thanks, Colin Wahl M.S. Biology candidate