Displaying 20 results from an estimated 3000 matches similar to: "If Statement"
2010 Oct 25
2
difftime error
R community,
I am trying to create an array of the time differences between datapoints
for a very large set. For some reason for 4 of the values the difference
has been calculated as NA.
Looking at the individual points two of them are "1981-03-29 01:40:00" and
"1981-03-29 02:00:00"
This is the exact same format as the other points that return values of 20
mins as expected.
2010 Oct 15
3
Create Arrays
Hi,
For this example:
O <- c(0 0 0 2 0 0 2 0)
I want to create an array every time O[i] > 0. The array should be in the
form;
R[j] <- array(-1, dim=c(2,O[i]))
i.e. if O[i] > 0 4 times I want 4 R arrays.
Does anyone have any suggestions?
Thanks,
Doug
--
View this message in context: http://r.789695.n4.nabble.com/Create-Arrays-tp2996706p2996706.html
Sent from the R help
2011 Feb 04
3
uniroot
Hi,
I am using the uniroot function in order to carry out a bivariate Monte
Carlo simulation using the logistics model.
I have defined the function as:
BV.FV <- function(x,y,a,A)
(((x^(-a^-1)+y^(-a^-1))^(a-1))*(y^(a-1/a))*(exp(-((1^(-a^-1)+y^(-a^-1))^a)+y^-1)))-A
and the procedure is as follows:
Randomly generate values of A~(0,1), y0 = -(lnA)^-1
Where: A=Pr{X<xi|Y=yi-1} and a is the
2005 Jul 02
3
packets with syn/fin vs pf_norm.c
Hi,
First of all, I know that not dropping SYN/FIN isn't really a big deal, it
just makes no sense. But since it doesn't make any sense, I don't see
the reason why not to discard them.
I'm running pf on FreeBSD 5.4-RELEASE-p3 and I scrub any traffic. I've
read some other posts on google and as far as I can tell, clearly invalid
packets (like packets with SYN/RST set) is
2013 Jul 12
4
simplify a dataframe
Hello
I have the following problem : group the lines of a dataframe when no
information change (Matricule, Nom, Sexe, DateNaissance, Contrat, Pays)
and when the value of Debut of lines i = value Fin of lines i-1
I can obtain it with a do loop. Is it possible to avoid the loop ?
The dataframe initial is df1
dput(df1)
structure(list(Matricule = c(1L, 1L, 1L, 6L, 6L, 6L, 6L, 6L,
6L, 8L, 8L, 8L,
2017 Apr 07
3
Distribuir intervalo de días entre meses
Hola,
Partiendo de un data frame con 2 variables de fecha (inicio y fin):
df <- data.frame(inicio = c(as.Date("2016-01-01"),
as.Date("2016-02-14")),
fin = c(as.Date("2016-02-01"),
as.Date("2016-02-29")))
Necesitaría crear 12 nuevas columnas adicionales, una
1998 May 24
1
R-beta: problem with graphics parameter "fin"
Hi,
I have the following problem (with R 0.61.3 an Linux, and a new and empty
workspace)
> oldpar<-par()
> par(oldpar)
Error: attempt to set invalid value for graphics parameter "fin".
> oldpar$fin
[1] 6.992034 6.990803
but now:
> oldpar$fin <- c(6.99,6.99)
> par(oldpar)
it works.
It seems, that if I set oldpar$fin to values greater than listed above
2003 Mar 06
1
Problems with variable types.
Hi all,
I have problems in a dataframe variables types.
Look:
from a loop function:
for(...){
...
dados.fin <- rbind(dados.fin, c(L=j, A=j^2,
Nsp=nsps,
N=length(amosfin$SP),
AmT="am",NAm=nam,
AMST=amst))
dados.fin <- rbind(dados.fin, c(L=j, A=j^2,
2014 Jul 17
4
Selección eficiente de individuos
Buenas
tardes,
Tengo un
data frame denominado “trabajadores”, que cubre desde el 1 de
enero de 1997 hasta el 30 junio de 1999, con 3 columnas: Identificador (ID), la
fecha de entrada en la empresa (ENT) y la fecha de salida (SAL). Deseo localizar
aquellos trabajadores que, durante dicho periodo, NO han llegado a pasar un 31
de diciembre y un 1 de enero seguidos (cambio de año) como asalariados
2004 Aug 06
2
decode in ppc 2003
Hi all,
Please a moment to look my source code, this is very similar to example of
the documentation. I added FIXED_POINT flag. My source code compile and
build but not decode correctly (the error may be in the while). I work with
eVC 4.0 and pocket pc 2003. Someone know what is the error?
Thanks.
Rodrigo.
#include "speex.h"
#define FRAME_SIZE 160
void CPlayerDlg::OnButton3()
{
2007 Apr 02
1
Problems with stereo data
Hi all,
I have a problem when I am encoding (or decoding) stereo audio.
With mono data, things are fine and everything works without any problems.
When I try to decode stereo data, all I get is a static sound - similar to that of a radio not tuned to any specific station. I wonder what might be wrong?
Below is the code, first, of the encoder and next that of the decoder. Any information or
2004 Apr 20
3
[Full-Disclosure] IETF Draft - Fix for TCP vulnerability (fwd)
Forwarded message:
> From full-disclosure-admin@lists.netsys.com Wed Apr 21 11:49:12 2004
> To: full-disclosure@lists.netsys.com
> From: Darren Bounds <dbounds@intrusense.com>
> Subject: [Full-Disclosure] IETF Draft - Fix for TCP vulnerability
> Date: Tue, 20 Apr 2004 18:19:58 -0400
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
2016 Jun 30
3
[CENTOS ]IPTABLES - How Secure & Best Practice
Ned,
Thank you very much for the response.
Great example following through on the premise.
It sounds like I need to have a better understanding of the traffic
patterns on my network to know the optimal order for iptables
filtering rules.
My brief example -
Premise: I want to limit outsiders from interfering with LAN client machines.
So, I have the following rules regarding forwarding traffic:
2005 Dec 06
1
problems decoding speex... please help
Hi all. I'm trying to decode speex using version 1.1.10's libspeex with
fixed_point enabled. copied the sample in the manual (1.1.11) with minor
revisions. While running the program, encountered this warning:
"Packet is larger than allocated buffer : 38"
when calling speex_bits_read_from (&bits, cbits, nBytes)
then my program terminated unexpectedly with errors (Unhandled
2010 Oct 13
1
Data Gaps
R community,
I am trying to write a code that fills in data gaps in a time series. I
have no R or statistics background at all but the use of R is proving to be
a large portion of my PhD research.
So far my code identifies where and the number of new entries required but I
do not know how to add additional rows or columns into an array. Any advice
on how this can be done?
Here is an example:
2010 Oct 13
1
Date Time Objects
I am trying to convert an array from numeric values back to date and time
format. The code I have used is as follows;
for (i in 0:(length(DateTime3)-1)) {
DateTime3[i] <- (strptime(start, "%m/%d/%Y %H:%M")+ i*interval)
where start <- [1] "1/1/1981 00:00"
However the created array (DateTime3) contains [1,] 347156400 347157600
347158800 347160000 347161200 347162400
2010 Jul 01
2
Sweave function
Dear list,
I have a question about the interaction between R code and Latex language trough the Sweave function in the package "utils".
What I'm trying to do is to write a report. Contrary to the examples shown in the Sweave Manual in which table already constructed by R are "exported" on Latex files, what I would like to do is to build a table in which I combine text and
2007 Feb 13
1
Hello Guys
hello everybody in this great mailing list , i have some difficulties to follow my code .
i solved some problems thanks to Carine Liang , but i still have one problem and i think it is fatal one.
when i encode the voice data in a wav file it is decoded without any errors it gives me 84 bytes wav file size for 139 kbytes wav audio data .Naturally i wanted to return my file back to its normal
2003 Mar 05
1
Dataframe in loop
Hi,
I try to make a dataframe in a loop function, but I dont have succeed.
The function is something like this:
for(i in c(10,12)) {
expr
for(j in c(1:2) {
total <- c(1,2,3,4,5,6,7)
nspf <- length(levels(as.factor(total)))
fin <- data.frame(L=i,N=nspf)
print(fin)
}
}
This print something like this:
L N
1 10 7
L N
1 10 7
L N
1 12
2004 Aug 06
1
decode in ppc 2003
Hi,
My problem is at the second fread function,
fread(&nbBytes, sizeof(int), 1, fin); //the first fread
fread(cbits,1, nbBytes, fin);// the second fread.
When I'm debugging always nbytes is greater than cbits. This give me a
execution error.
Thanks.
Rodrigo.
<p><p><p>-----Mensaje original-----
De: owner-speex-dev@xiph.org [mailto:owner-speex-dev@xiph.org] En nombre