Displaying 20 results from an estimated 30000 matches similar to: "Simple - Finding vector in a vector"
2012 Jun 13
2
separate the sentence after finding a particular word
hello,
I want to know ..how we can separate the sentence after finding a particular
word...
for example
I love to watch movies of Hollywood but should not be romantic...I want to
join you school but due to bad financial condition I cant..
I want output in following format
I love to watch movies of Hollywood
should not be romantic
I want to join you school
due to bad financial condition I cant
2012 Oct 04
2
t-test
Dear Group,
I want to do a t-test calculation on a large data set.
I am pasting some part of it
structure(list(Name = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L), .Label = c("CTK100", "CTK103", "CTK121"), class = "factor"),
Score = c(236.9726, 207.0055, 237.3464, 224.4774, 236.5034,
2013 Jun 23
1
Scaling Statistical
Short question: Is it possible to use statistical tests, like the Augmented
Dickey-Fuller test, in functions with for-loops? If not, are there any
alternative ways to scale measures?
Detailed explanation: I am working with time-series, and I want to flag
curves that are not stationary and which display pulses, trends, or level
shifts.
>df
DATE ID VALUE2012-03-06 1
2012 Jul 06
1
Problem using Lag on time series
I'm trying to duplicate something in Excel, where it is easy to reference the previous row in formula. Have been stuck on this for ages trying to achieve the same result in R. I've managed to do it with a loop but it takes ages on a large data set.
What I want to do is create a new variable in a matrix that will refer to it's previous value if the ifelse statements aren't met.
2013 Jul 22
4
How to split two levels several times?
Hi,
I have a small problem with the function split() and would appreciate your help.
I have a table called ?XXX? with 2 columns and 49 rows. The 49 rows belong to 8 different levels (electrode1, ...,electrode8). I want to split the table always at the row where ?electrode1? starts again so that I can export 7 individual dataframes (numbered ?dataframe1? to ?dataframe7?) which contain always
2012 Jun 26
2
Ljung-Box test (Box.test)
I fit a simple linear model y = bX to a data set today, and that produced 24 residuals (I have 24 data points, one for each year from 1984-2007). I would like to test the time-independence of the residuals of my model, and I was recommended by my supervisor to use the Ljung-Box test. The Box.test function in R takes 4 arguments:
x a numeric vector or univariate time series.
lag the statistic
2012 Sep 19
3
effective way to return only the first argument of "which()"
Hi,
I was looking for a function like "which()" but only returns the first argument.
Compare:
x <- c(1,2,3,4,5,6)
y <- 4
which(x>y)
returns:
5,6
which(x>y)[1]
returns:
5
which(x>y)[1] is exactly what i need. I did use this but the dataset
is too big (~18 mio. Points).
That's why i need a more effective way to get the first element of a
vector which is
2005 Jan 27
5
Finding "runs" of TRUE in binary vector
I have a binary vector and I want to find all "regions" of that vector
that are runs of TRUE (or FALSE).
> a <- rnorm(10)
> b <- a<0.5
> b
[1] TRUE TRUE TRUE FALSE TRUE FALSE TRUE TRUE TRUE TRUE
My function would return something like a list:
region[[1]] 1,3
region[[2]] 5,5
region[[3]] 7,10
Any ideas besides looping and setting start and ends directly?
2012 Jul 13
1
R combining many vectors of predictable name into one date frame
G'day R (power) users,
I have a many vectors, called:
ib1
ib2
ib3
...
ib100
and I would like them in one data frame (df) such that:
> df
ib1 ib2 ib3 ib4 ..... ib100
x x x x x
x x x x x
x x x x x
I have attempted:
hold.list <- list(objects(pattern="ib"))
df <- data.frame(hold.list)
but that
2015 Jan 28
2
[Q] Get formal arguments of my implemented S4 method
Interrogating some (of my own) code in another package.
>norm.meth <- getMethod("normalize", "MatrixLike")
>message("str(norm.meth)")
>str(norm.meth)
>message("show(norm.meth at .Data)")
>show(norm.meth at .Data)
Last show() displays this:
function (object, ...)
{
.local <- function (object, method = c("median",
2006 May 18
1
Recommended style with calculator and persistent data
I have some calculations that require persistent state. For example,
they retain most of the data across calls with different parameters.
They retain parameters across calls with different subsets of the cases
(this is for distributed computation). They retain early analysis of
the problem to speed later computations.
I've created an S4 object, and the stylized code looks like this
calc
2015 Jan 28
2
[Q] Get formal arguments of my implemented S4 method
I'm attempting to reflect the information for use with corresponding
fields in GUI (in a different package), to provide default values,
argname as key for UI label lookups, etc.
So I want something much more like the formals of the implementation:
{
"object",
"method": c("median", "vs", "tukey"),
2012 Nov 16
1
Split data frame and create a new column
I need to split a data frame into 3 columns. The column I want to split
contains indices of lag (prefix L1 or L2 and suffix 01, 03, 04), station
name (shown in the sample data as capitalized G, P and S) and pollutant
name. Names with no ?L? prefix or 01/04 suffix are lag 0. Lag 01 is average
of lag 0 and 1, and 04 is average of 0 to 4 days. How can one do that in R?
I will ignore the other
2012 Oct 08
3
How to count combinations
Dear all,
Need a help. I would like to count combination of two columns:
structure(list(V1 = structure(c(4L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L), .Label = c("23",
"55", "67", "Env"), class = "factor"), V2 = structure(c(9L, 7L,
7L, 7L, 2L, 1L, 11L, 11L, 11L, 11L, 5L, 6L, 6L, 3L, 8L, 2L, 1L,
4L, 4L,
2007 Dec 03
2
Why is the program too slow?
Hi,everyone.
I use the following program calculates Fisher's alpha from counts of individuals and species. The program is wrote by Prof. Kyle Harm.
However, when I run the program, it can work very quickly sometimes, but it can not work very well sometimes. It depends on the counts of individuals and species.
For example,
> calc.alpha(1000,70)
[1] 17.14375
> calc.alpha(10000,70)
[1]
2006 Jan 30
2
TI83 plus Texas Instrument Calculator, Serial cable and USB cable
Hi all
I installed *wine 9.6 on fedora4, IE6* , and *APPs* for *CALC TI83
plus *
i tried to use the *USB *cable to connect to the *CALC* but did`t work
then i used *serial cable*
after i make *? ln -s /dev/ttyS0 ~/dosdevices/com1? *then i run the "TI
Connect APPs" to
coonect to the *CALC *it finds the *COM1* when it tried connect to the*
CALC* but connection
filed.
any one
2012 Jul 24
3
Collapsing a vector/data-frame based on the previous values
Hello
I have a data frame like this:
dput(states)
structure(list(Date = c("24/07/2012", "25/07/2012", "26/07/2012",
"27/07/2012", "28/07/2012", "24/07/2012", "25/07/2012", "26/07/2012",
"27/07/2012", "28/07/2012"), State = c(1L, 1L, 1L, 1L, 1L, -1L,
-1L, -1L, 1L, -1L)), .Names = c("Date",
2008 Sep 25
1
Confusion over syntax in a package
Hello,
I am new to R and I am attempting to use the ProbForecastGOP package
for some research I am conducting.
The package works fine when I call the functions from the command line
as the examples instruct.
However, I am attempting to step through some of the functions so that
I can obtain a better idea of what is going on. I have come to the
following command:
2019 Jun 06
4
Adding llvm-undname to the llvm-cov bot
On Wed, Jun 5, 2019 at 1:33 PM <vsk at apple.com> wrote:
>
>
> On Jun 4, 2019, at 4:41 PM, Nico Weber <thakis at chromium.org> wrote:
>
> On Mon, Jun 3, 2019 at 2:06 PM <vsk at apple.com> wrote:
>
>> Hi Nico,
>>
>> Sorry for the delay, I've been OOO. The llvm-cov bot should produce
>> reports for llvm-undname starting today.
>>
2012 Jul 25
3
lagged variables
hi guys,
i have some trouble in creating lagged variables to use as external
regressors.
i'm trying to use lag(x) but it gives me as result the same time series (x),
adding this part at the end:
attr(,"tsp")
[1] 0 2323 1
where do i wrong?are there other functions to be used?
thanks
sara
--
View this message in context: