similar to: selecting every nth item in the data

Displaying 20 results from an estimated 3000 matches similar to: "selecting every nth item in the data"

2005 Jan 05
2
plotting percent of incidents within different 'bins'
Hi Say I have some data, two columns in a table being a binary outcome plus a predictor and I want to plot a graph that shows the percentage positives of the binary outcome within bands of the predictor, e.g. Outcome predictor 0 1 1 2 1 2 0 3 0 3 0
2005 Jun 10
1
logistic regressioin - course ornotes
Hi I am using R for logistic regression and finding it very useful. However, I wondered if anyone could point me to any course or notes on this subject using R. All help most welcome. Stephen -- Internal Virus Database is out-of-date. Checked by AVG Anti-Virus. [[alternative HTML version deleted]]
2005 Aug 08
1
chisq.test
Hi I am trying to use this function. Can anyone show me how I would input the following example? Chi-Squared = (40-30)^2 + (20-30)^2 + (30-30)^2 30 30 30 = 3.333 + 3.333 + 0 = 6.666 (p value = 0.036) I want to be able to use different denominators so can you show me how I can do it to accommodate these rather than assuming they are all the
2005 Aug 12
1
chisq warning
Hi I am running chisq as below and getting a warning. Can anyone tell me the significance or the warning? > chisq.test(c(10 ,4 ,2 ,6 ,5 ,3 ,4 ,4 ,6 ,3 ,2 ,2 ,2 ,4 ,7 ,10 ,0 ,6 ,19 ,3 ,2 ,7 ,2 ,2 ,2 ,1 ,32 ,2 ,3 ,10 ,1 ,3 ,9 ,4 ,10 ,2 ,2 ,4 ,5 ,7 ,6 ,3 ,7 ,4 ,3 ,3 ,7 ,1 ,4 ,2 ,2 ,3 ,3 ,5 ,5 ,4 ), p =c(0.01704142 ,0.017988166 ,0.018224852 ,0.017751479 ,0.017988166 ,0.018224852 ,0.017278107
2005 Jun 16
1
logistic regression - using polys and products of features
Hi I can get all my features by doing this: > logistic.model = glm(similarity ~ ., family=binomial, data = cData[3001:3800,]) I can get the product of all my features by this: logistic.model = glm(similarity ~ . ^ 2, family=binomial, data = cData[3001:3800,]) I don't seem to be able to get polys by doing this: logistic.model = glm(similarity ~ poly(.,2), family=binomial, data
2011 Oct 21
2
plotting with a symbol on every nth point
Hi, I would like to produce a plot with a symbol on every nth point in a time series data, like the one in the following: http://www.phon.ucl.ac.uk/home/yi/ProsodyPro/EnglishFocus.png x <- seq(-100,1000,25) plot(x,type="l") Could someone help me out with the above example? Thanks.... [[alternative HTML version deleted]]
2012 Apr 05
3
Apply function to every 'nth' element of a vector
Dear R users, how do I e.g. square each second element of a vector with an even number of elements? Or more generally to apply a function to every 'nth' element of a vector. I looked into the apply functions, but found no hint. For example: v <- c(1, 2, 3, 4) mysquare <- function (x) { return (x*x) } w <- applyfun(v, mysquare, 2) then w should be c(1, 4, 3, 16) Thanks for
2008 Feb 25
1
Plotting series marked with a symbol on every nth data point, preferably in ggplot...
Hello! I am working with signals and a plot of several signals on the same axes can get quite messy. With lines that are very fractured, distinction by only the linestyle is not very clear. If I add symbols to the plot however, there are so many symbols, that they overplot and the whole plot is unreadable once again. I am looking for advice on how to make a plot with continuous lines and symbols
2012 Dec 02
2
How to calculate mean of every nth time series data with zoo or xts ?
Hello, I have 1-minute time series stock data and I'd like to calculate mean of every n-th candle data of m-days. result = c(mean of 1th data, mean of 2nd data, ...) mean of 1th data = (1th data of 2012-1-1 + 1th data of 2012-1-2 + 1th data of 2012-1-3) / 3 mean of 2nd data = (2nd data of 2012-1-1 + 2nd data of 2012-1-2 + 2nd data of 2012-1-3) / 3 ... Could you let me know the fastest
2001 Mar 28
4
How to extract every nth element from a vector
R-helpers: Is there a simple way to extract every nth element from a very long vector? [The vector I want to sample from is an object returned by lowess(). It is so long (11,628 pairs of elements) that it is causing non-R-related memory problems elsewhere. I don't see a better way other than sampling the output returned from lowess.] Thanks in advance. Barry Cooke
2010 Apr 12
1
N'th of month working day problem
Dear Gabor, Thanks for your reply. however: > tail(DJd) ^DJI.Close 2010-04-01 10927.07 2010-04-05 10973.55 2010-04-06 10969.99 2010-04-07 10897.52 2010-04-08 10927.07 *2010-04-09 10997.35* > tail(ag) 2009-11-30 10344.84 2009-12-31 10428.05 2010-01-31 10067.33 2010-02-28 10325.26 2010-03-31 10856.63 *2010-04-30 10997.35 * It seems the script "makes up"
2005 Apr 27
1
making table() work
I am trying to do some verification across a large dataset, cuData, that has 23 columns. Column 23 (similarity) is the outcome 0 or 1 and the other columns are the features. I do this: verificationglm.model <- glm(formula = similarity ~ ., family=binomial, data=cuData[1:1000,]) and produce the model: > summary(verificationglm.model) Call: glm(formula = similarity ~ ., family =
2009 Mar 19
2
nth root
Hi, Is there a function in R to calculate the nth root, similar to the MATLAB function NTHROOT()? Thanks, Martin Biuw [[alternative HTML version deleted]]
2018 May 03
4
length of `...`
On 03/05/2018 11:01 AM, William Dunlap via R-devel wrote: > In R-3.5.0 you can use ...length(): > > f <- function(..., n) ...length() > > f(stop("one"), stop("two"), stop("three"), n=7) > [1] 3 > > Prior to that substitute() is the way to go > > g <- function(..., n) length(substitute(...())) > >
2008 Apr 22
2
nth step transition matrices
Hello, I have a question in regards to markov chains and transition probabilities. I am trying to figure out a way to calculate the "kth-step transition matrix" of a given matrix. Say for example I have a single step 2x2 matrix: 1 2 P= 1 .95 .05 2 .01. 99 If I were to convert this matrix to a 2-step transition probability matrix I would get:
2009 Jul 07
3
Answering the nTh call ...
Curious to know if anyone's created something similar to the following, if so and you'd care to share an AGI or dialplan, much appreciated. I will be eventually write a script to answer the nTH call. (if I can't find it (why reinvent wheels). Looking to do some testing sending anywhere between 50-200 calls to a machine. I'd like a Snom/Polycom/whatever to pick up after the nTh
2009 Aug 18
2
value of nth percentile
Dear All, I have to get the value of say 90th percentile of precipitation time series.. The series is of daily precipitation value of 96 years, I have to to get 90the percentile value of daily precipitation each year. If you know the R code or command for this please let me know. I would appreciate your early response. Thanking you, Sincerely, Ajay.
2005 Apr 29
1
problem with nth patch, counter parameter...I think
Hi all, I need some guidance to get my problem fixed. I believe there is an issue with the ''nth'' patch from the patch-o-matic, which is labeled as status ''works''. I have tunnels back and forth across the internet, using ''nth'' to balance packets between different public networks (over the tunnels). I need to access some networks over two
2017 Dec 22
2
Having problems connecting
I am having problems connecting two computers over the vpn. Form the debug messages it looks like the two computers are connected via tcp on port 655. But when I try to ping the other computer I get the message: Cannot route packet from TrackServer (MYSELF): unknown IPv4 destination address 10.23.23.255 One computer has the VPN ip address 10.23.23.1, the other 10.23.23.2. The network mask is
2012 Jan 08
1
Difference across the Nth dimension of an array
I have a multidimensional array - in this case with 4 dimensions of x,y,z and time. I'd like to take the time derivative of this matrix, i.e. perform the diff operator along dimension number 4. In Matlab, there is a simple option to specify which dimension the difference is to be taken across., but I can't see this in R. I realise I can use aperm to rotate my array so that time is in