similar to: counting run lengths

Displaying 20 results from an estimated 900 matches similar to: "counting run lengths"

2011 Jan 14
2
selecting elements in vector
Hi everybody, I have the following problem. I have a vector containing character elements, such as: list = c("aa","bb","cc","dd","ee") I want to create an index which identifies the elements that are different from, e.g. "aa" and "bb". When I do the following: jj = list!="aa" & list!="bb" > jj
2007 Nov 15
2
counting strings of identical values in a matrix
Hello I have this problem. I have a large matrix of this sort: > prova [,1] [,2] [,3] [,4] [1,] 3 3 3 3 [2,] 3 3 3 1 [3,] 1 3 3 3 [4,] 1 1 1 3 [5,] 3 1 1 3 [6,] 3 1 1 3 [7,] 1 3 1 3 [8,] 1 3 3 3 What I want to do is to count the number of sequences of ones and stack the results in a
2013 Mar 12
1
loading data frames and rbind them
Hello everybody I have the following problem. I have to load a number of xls files from different folders (each xls file has the same number of columns, and different numbers of rows). Each xls file is named with a number, i.e. 12345.xls and is contained in a folder with same name, say 12345) Once loaded, I want to rbind all of them to obtain a single database. I think I successfully did the
2011 Dec 07
1
removing specified length of text after a period in dataframe of char's
Dear all, I'm trying to remove some text after the period (a decimal point) in the data frame 'hi', below. This is one step in formatting a table. So I would like e.g. "2.0" to become "2" and "5.3" to be "5.3", where the variable digordered contains the number of digits after the decimal that I would like to display, in the same order in which
2003 Nov 05
1
Estimate hazard function from right-censored data only
Dear All, I would like to ask if it is possible to estimate a hazard function using the muhaz command when all the data is right-censored. My data has information of the number of weeks people has been unemployed but all of them are unemployed at the date of the survey, that is, I cannot observed when the individuals leave the unemployment state. I appreciate your help, Best, Monica L.
2011 Jan 04
5
scoping/non-standard evaluation issue
Dear r-devel list members, On a couple of occasions I've encountered the issue illustrated by the following examples: --------- snip ----------- > mod.1 <- lm(Employed ~ GNP.deflator + GNP + Unemployed + + Armed.Forces + Population + Year, data=longley) > mod.2 <- update(mod.1, . ~ . - Year + Year) > all.equal(mod.1, mod.2) [1] TRUE > > f <-
2012 Feb 08
1
Fitting polynomial (power greater than 2)
Hey all, first time poster here. I'm new to R and working on my first real programming and forecasting asignment. I'm using unemployment data from 1948-2012. I successfully completed part a and the linear fit for part b, but i am really struggling fitting a polynomial with a power greater than 2 to my forecast. I'll upload my R code at the bottom. Any help is very much appreciated!
2010 Feb 25
1
How to do: Correlation with "blocks" (or - "repeated measures" ?!) ?
Hello dear R help group, I have the following setup to analyse: We have about 150 subjects, and for each subject we performed a pair of tests (under different conditions) 18 times. The 18 different conditions of the test are complementary, in such a way so that if we where to average over the tests (for each subject), we would get no correlation between the tests (between subjects). What we wish
2011 Dec 21
1
matrix multivariate bootstrap: order of results in $t component
[This question is hopefully straight-forward, but difficult to provide reproducible code.] I'm doing a multivariate bootstrap, using boot::boot(), where the output of the basic computation is a k x p matrix of coefficients, representing a tuning constant x variable, as shown in the $t0 component from my run, giving a 3 x 6 matrix > lboot$t0 GNP Unemployed Armed.Forces
2003 Oct 23
2
GIS re-mapping / polygon overlap
In Germany the Unemployment Agency uses a sectioning of the german map that is different from the usual Administrative Boundaries. Some demographic data are available in Administrative Boundaries only, some in Unemployment Boundaries only. I would like to generate estimates in one boundary system of data availabe in the other boundary system, and would appreciate advice concerning the following
2013 Oct 29
1
c6.4: D-Link USB network device (2001:1a02) not work.
Hi, I have plug in this USB network device: > Bus 001 Device 002: ID 2001:1a02 D-Link Corp. > T: Bus=01 Lev=01 Prnt=01 Port=04 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 > D: Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=00 MxPS=64 #Cfgs= 1 > P: Vendor=2001 ProdID=1a02 Rev= 0.01 > S: Manufacturer=D-Link > S: Product=DUB-E100 > S: SerialNumber=E5ECEB > C:* #Ifs= 1 Cfg#= 1
2012 Oct 04
1
APC Smart-UPS 1200
Hi. Is the subject UPS model supported? I believe so, but I don't have a unit to test with. Any comments on this model? I'm trying to advise a colleague. Thank you, as always. T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=051d ProdID=0003 Rev= 1.06 S: Manufacturer=American Power
2006 Jul 12
4
Keep value lables with data frame manipulation
Dear R, I import data from spss into a R data.frame. On this rawdata I do some data processing (selection of observations, normalization, recoding of variables etc..). The result is stored in a new data.frame, however, in this new data.frame the value labels are lost. Example of what I do in code: # read raw data from spss rawdata <- read.spss("./data/T50937.SAV",
2017 Jul 03
3
reshaping the data
Dear all, I would appreciate please a piece of help regarding the use of acast/dcast functions in reshape2 package. Specifically, I'm working with a data frame, that has information about SAMPLE, GENE, and TYPE of MUTATION (as shown below): Sample Gene Type 22M AEBP1 SNV 17M AEBP1 SNV 22M ATR INDEL 22M ATR SNV 11M BTK SNV 11M BTK
2009 Oct 29
1
How to turn individual consecutive information into survival objects?
Dear R List, I have a dataset with the following structure: """personal_id, p_0, p_1, p_2, .... , p_36, p_37 1, NA, 1, 4, .... , 1, NA 2, NA, NA, NA, .... , 4, NA . . . 6020, NA, 3, 3, ...., NA, NA 6021, NA, 2, 2, ...., 4, NA """ I used some made-up data. It is just meant to show the structure of the dataset. The variables of interest are p_0, ... p_37.
2011 Dec 22
1
overlaid filled contour plots
I'm trying to make a set of contour plots of bivariate kernel density estimates, showing three such plots overlaid, similar to this plot http://euclid.psych.yorku.ca/SCS/Private/Test/ridge-boot2.pdf except that I would like to have the contours *filled* (using transparent colors). To make this reproducible, I've saved the results of KernSmooth::bkde2D() in the following file:
2005 Aug 24
1
lm.ridge
Hello, I have posted this mail a few days ago but I did it wrong, I hope is right now: I have the following doubts related with lm.ridge, from MASS package. To show the problem using the Longley example, I have the following doubts: First: I think coefficients from lm(Employed~.,data=longley) should be equal coefficients from lm.ridge(Employed~.,data=longley, lambda=0) why it does not happen?
2005 Sep 23
11
trying to use powerware 3110 USB with NUT
Ok, I installed the ups, and installed nut, and /proc/bus/usb/devices says this T: Bus=03 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=1.5 MxCh= 0 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=06da ProdID=0002 Rev= 0.01 S: Manufacturer=POWERWARE S: Product=Powerware UPS C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 20mA I: If#= 0 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=00 Prot=00
2005 Sep 26
2
Help with USB support for a Kebo UPS-650D
Folks, I'm fairly new to this whole Linux UPS thingie, but I'd quite like to have a look at getting my UPS to work under Linux and would be grateful for any help in getting a driver. I have a reasonable working knowledge of Linux and software development, and thus am happy to modify config files, alter kernel settings, etc, although I'm no C guru. I have a Kebo UPS-650D, which
2010 Nov 18
1
Accessing variables inside a namespace
Hello Group, I am trying to see if there is way to access data that is inside another namespace. For e.g. the addATR function in the quantmod package calculates the ATR using the TTR package and then plots it to the graph. Now since it has already calculated the info that I need, can I access that data which if I look at the function code is stored in a variable called "atr"