similar to: How to index the occasions in a vector repeatedly under condition 1? if not, it will give a new index.

Displaying 20 results from an estimated 2000 matches similar to: "How to index the occasions in a vector repeatedly under condition 1? if not, it will give a new index."

2020 Feb 21
0
function(x) !is.na(x) & x "is_true(.)" etc. was: [R] How to index..
Diverted from R-help to R-devel, as I've changed the focus to consider adding new functions to R : >>>>> peter dalgaard >>>>> on Fri, 21 Feb 2020 10:46:16 +0100 writes: > It has isTRUE, but that is not vectorized, and in fact explicitly tests length==1, so >> isTRUE(c(TRUE,FALSE,NA)) > [1] FALSE >> isTRUE(c(TRUE,TRUE,
2009 Aug 05
2
Counting things
I've completed an experiment and want to summarize the results. There are two things I like to create. 1) A simple count of things from the data.frame with predictions 1a) Number of predictions with probability greater than x 1b) Number of predictions with probability greater than x that are really true In SQL, this would be, "Select count(predictions) from
2014 Dec 17
3
[PATCH 0/3] Allow environment variables to have boolean values.
https://bugzilla.redhat.com/show_bug.cgi?id=1175196 Currently if you write something like LIBGUESTFS_DEBUG=0 or LIBGUESTFS_DEBUG=true then it doesn't do what you probably expect. This patch series fixes that. Rich.
2010 Jul 15
2
taking daily means from hourly data
I have a data frame (morgan) of hourly river flow, river levels and wind direction and speed thus: Time hour lev.morgan lev.lock2 lev.lock1 flow direction velocity 1 2009-07-06 15:00:00 15 3.266 3.274 3.240 1710.6 180.282 4.352 2 2009-07-06 16:00:00 16 3.268 3.272 3.240 1441.8 192.338 5.496 3 2009-07-06 17:00:00 17 3.268
2018 Mar 15
2
Vary an equation using values from a sequence
Hi All, I have a vector of data on which I am operating. The equation with which I want to operate on the vector has a value k. I want to run the equation and output a new vector, each time replacing k with each value from the sequence I defined. I have thought about using for loops and such, but this seems like overkill. I am wondering if there is a simple solution that would allow me to
2018 Oct 01
7
[PATCH v2 API PROPOSAL 0/5] inspection Add network interfaces to inspection data.
The proposed API is the same as v1, but this includes an implementation (for /etc/sysconfig/network-scripts/ifcfg-*) and modifications to virt-inspector. This compiles and works. If you look in patch 5 you can see proposed output as virt-inspector XML for a guest (although this guest has not been booted, so a real guest would hopefully have a hwaddr="MAC" attribute too). Rich.
2005 May 16
3
CLI and DNIS presented to Analog extension
My company is based in Australia and we have a need to be able to present CLI (ANI) and DNIS to an analog extension. Currently our PABX vendor is saying they can only deliver CLI between the first and second cadence. The system will collect calls via an aggregate of ISDN PRI services from the PSTN and then direct them to the analog extensions in a hunt group configuration. It is important that
2018 Mar 15
0
Vary an equation using values from a sequence
I thnk what you want is ?outer. e.g.: outer(Data -min(Data),value,FUN = "+") Whether this works for your real task, however, may depend on details and complexities that you have omitted. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom
2009 May 14
3
memory usage grows too fast
Hi All, I have a 1000x1000000 matrix. The calculation I would like to do is actually very simple: for each row, calculate the frequency of a given pattern. For example, a toy dataset is as follows. Col1 Col2 Col3 Col4 01 02 02 00 => Freq of ?02? is 0.5 02 02 02 01 => Freq of ?02? is 0.75 00 02 01 01 ? My code is quite simple as the following to find the pattern ?02?.
2023 Nov 03
1
I need to create new variables based on two numeric variables and one dichotomize conditional category variables.
Hello Everyone, I have three variables: Waist circumference (WC), serum triglyceride (TG) level and gender. Waist circumference and serum triglyceride is numeric and gender (male and female) is categorical. From these three variables, I want to calculate the "Lipid Accumulation Product (LAP) Index". The equation to calculate LAP is different for male and females. I am giving both
2004 May 05
4
anyone know how to combine two vector with some # overlaped?
Hi, there, Suppose I have two vector say x=c(1 2 3 4 5) and y=(2 3 6 7). Then I want to combine these two vector together and get z=c(1 2 3 4 5 6 7) with 2 and 3 only appear once. I want to extend this one to a general case(say more than 100 elements in x and y and each time I don't know which elements are the same). Do you happen to know how to do this and which command should use? Thank
2023 Nov 03
1
I need to create new variables based on two numeric variables and one dichotomize conditional category variables.
Well, something like: LAP <- ifelse(gender =='male', (WC-65)*TG, (WC-58)*TG) The exact code depends on whether your variables are in a data frame or list or whatever, which you failed to specify. If so, ?with may be useful. Cheers, Bert On Fri, Nov 3, 2023 at 3:43?AM Md. Kamruzzaman <mkzaman.m at gmail.com> wrote: > Hello Everyone, > I have three variables: Waist
2019 Dec 15
4
source definition for R_NilValue/return from TYPEOF(R_NilValue)
Hello, for reasons I want to know the return value of TYPEOF(R_NilValue), I expect it to be NILSXP, but I can't find this documented anywhere. Ideally, I'd like to see the source definition of R_NilValue, but after fair bit of searching I cannot find an obviously location for this. Would someone please point me in the right direction? thanks -- CRICOS provider code 00123M
2024 Jan 17
1
Is there any design based two proportions z test?
Hello Everyone, I was analysing big survey data using survey packages on RStudio. Survey package allows survey data analysis with the design effect.The survey package included functions for all other statistical analysis except two-proportion z tests. I was trying to calculate the difference in prevalence of Diabetes and Prediabetes between the year 2011 and 2017 (with 95%CI). I was able to
2023 Nov 03
1
I need to create new variables based on two numeric variables and one dichotomize conditional category variables.
df$LAP <- with(df, ifelse(G=='male', (WC-65)*TG, (WC-58)*TG)) That will do both calculations and merge the two vectors appropriately. It will use extra memory, but it should be much faster than a 'for' loop. Regards, Jorgen Harmse. ------------------------------ Message: 8 Date: Fri, 3 Nov 2023 11:10:49 +1030 From: "Md. Kamruzzaman" <mkzaman.m at gmail.com>
2005 Oct 04
0
The error message in package Mix
Hi all, When using package MIX, I often get the error: NA/NaN/Inf in foreign function call (arg 1). For example, > s<-prelim.mix(Y,6) Error in prelim.mix(Y, 6) : NA/NaN/Inf in foreign function call (arg 1) or when I ran: MI<-vector("list",5) #<--vector of complete data after MI fit.model.mi<-vector("list",5) rngseed(1234567) #<-- set random number
2005 Mar 19
1
ANI & DNIS sent to analog FXs Port Possible
Good Day list, Need assistance determining the best place to read up on whether Asterisk can help me out. I have a situation where I need to do the following <PRI from Telco> ------- <Analog Channel Bank>------------<Proprietary Box> | | | | | | <PRI Port 1 of Digium Quad T1> <PRI Port 2 of Digium Quad T1> | | | | | |
2004 Jun 29
2
Numbers as symbols
I want to use question numbers from my survey data (fake data below) as markers in a scatterplot. I'm using "as.character" to convert question numbers to characters. However, plot truncates the 0 (zero) off of question 10. How can I get the ending zero so I can add questions 11 - 20? # Sample code below Question <- c(1,2,3,4,5,6,7,8,9,10) Performance <-
2009 Feb 10
0
[fdo] Announce: Linux Desktop Testing Project (LDTP) 1.5.0 released
Greetings all, We are proud to announce the release of LDTP 1.5.0. This release features number of important breakthroughs in LDTP as well as in the field of Test Automation. This release note covers a brief introduction on LDTP followed by the list of new features and major bug fixes which makes this new version of LDTP the best of the breed. Useful references have been included at the end of
2001 Nov 29
3
Reset trellis plot backgroud color
Hello, I run R on Windows 2000. When I load lattice library and plot some lme class objects, the graphic window displays a dark-green color. Graphics look ok on the screen, but lines and points become invisible whem I send the plot to a printer because of the background color. Are there ways to reset the background color? Both par(bg=) and windows() do not work. Any ideas? Richard