Re: [R] Need some help with data-wrangling in R

2018-08-24 Thread Rui Barradas
Hello, Cross-posting is not very well seen by R-Help. Please wait for an answer to one of your posts before posting somewhere else. https://stackoverflow.com/questions/52008756/how-to-get-a-list-of-ip-addresses-from-an-ip-range-using-r Rui Barradas On 24/08/2018 17:34, Amit Govil wrote: Hi,

Re: [R] Need some help with data-wrangling in R

2018-08-24 Thread Bert Gunter
" list of network blocks till 3rd octet:" This is incomprehensible to me. If that is so for others, also, I suggest that you provide a reproducible example (see posting guide) to explain what you mean. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along an

[R] Need some help with data-wrangling in R

2018-08-24 Thread Amit Govil
Hi, I have log data in which one of the columns have IP ranges and the next column is corresponding ports. Eg: IPRange Port 10.78.64.0-10.78.66.255 D, A, C I need to expand the IPRange column into a list of network blocks till 3rd octet: IPRange IP Port 192.100.176.0-192.100.179.255 192.100.17

Re: [R] Need some help with regular expression

2016-12-15 Thread David Winsemius
older. > > Thanks, > Steven > > > From: Steven Nagy [mailto:nst...@gmail.com] > Sent: Monday, December 12, 2016 10:50 PM > To: 'Bert Gunter' > Cc: 'R-help' > Subject: RE: [R] Need some help with regular expression > > Hi Bert and all,

Re: [R] Need some help with regular expression

2016-12-15 Thread Jeff Newmiller
der. > >Thanks, >Steven > > >From: Steven Nagy [mailto:nst...@gmail.com] >Sent: Monday, December 12, 2016 10:50 PM >To: 'Bert Gunter' >Cc: 'R-help' >Subject: RE: [R] Need some help with regular expression > >Hi Bert and all, > >Sorry I was

Re: [R] Need some help with regular expression

2016-12-15 Thread Steven Nagy
nt: Monday, December 12, 2016 10:50 PM To: 'Bert Gunter' Cc: 'R-help' Subject: RE: [R] Need some help with regular expression Hi Bert and all, Sorry I was too busy at work and didn't have much time to continue this until now. So I studied "?regexp" and I ca

Re: [R] Need some help with regular expression

2016-11-20 Thread Bert Gunter
brackets? > Is ":alnum:" specific to R? I don't think "regexr.com" understands that. Or > maybe that site is for regular expressions in Javascript, and the syntax is > different in R? > > Thank you, > Steven > > -----Original Message- > From: Ber

Re: [R] Need some help with regular expression

2016-11-20 Thread Steven Nagy
c to R? I don't think "regexr.com" understands that. Or maybe that site is for regular expressions in Javascript, and the syntax is different in R? Thank you, Steven -Original Message- From: Bert Gunter [mailto:bgunter.4...@gmail.com] Sent: Sunday, November 20, 2016

Re: [R] Need some help with regular expression

2016-11-20 Thread Bert Gunter
If I understand you correctly, I think you are making it more complex than necessary. Using your example (thanks!!), the following should get you started: > x<- c("Name.MEMBER_TYPE: NMA -> STU ; CATEGORY: -> 1 ; CITY: MISSISSAUGA -> > Mississauga ; ZIP: L5N1H9 -> L5N 1H9 ; COUNTRY: CAN -> ; ME

[R] Need some help with regular expression

2016-11-20 Thread Steven Nagy
I tried out a regular expression on this website: http://regexr.com/3en1m So the input text is: "Name.MEMBER_TYPE: -> STU" The regular expression is: ((?:\w+|\s) -> STU|STU -> (?:\w+|\s)) And it returns: " -> STU" but when I use in R, it doesn't return the same result: strapply(c

Re: [R] need some help with date

2016-08-14 Thread Jeff Newmiller
Thank you for the (not quite working) example. a) your '= "character"' bit is a bit anti-productive, since on the one hand you are indicating that a default value can be used (so omitting any argument is okay) yet the default value you are specifying is invalid. b) The origin argument is rare

Re: [R] need some help with date

2016-08-14 Thread Jim Lemon
Hi Glenn, Perhaps this will help: dateCentury<-function(x,new_century=20) { xbits<-strsplit(x,"/") long_year<-function(x,new_century) { x[3]<-ifelse(as.numeric(x[3]) <= new_century, paste(20,x[3],sep=""), paste(19,x[3],sep="")) xdate<-paste(x,collapse="/") return(xdate) } newx<-as.

Re: [R] need some help with date

2016-08-14 Thread peter dalgaard
> On 15 Aug 2016, at 00:40 , Glenn Schultz wrote: > > Here is a sample of the data that I am working with. Dates may go back as > far as 1930’s. When I use as.Date() I noticed that any data < 12/31/68 > returns as the new century. So I wrote this function below to be applied to > the data

Re: [R] need some help with date

2016-08-14 Thread David Winsemius
> On Aug 14, 2016, at 3:40 PM, Glenn Schultz wrote: > > Here is a sample of the data that I am working with. Dates may go back as > far as 1930’s. When I use as.Date() I noticed that any data < 12/31/68 > returns as the new century. So I wrote this function below to be applied to > the dat

[R] need some help with date

2016-08-14 Thread Glenn Schultz
Here is a sample of the data that I am working with. Dates may go back as far as 1930’s. When I use as.Date() I noticed that any data < 12/31/68 returns as the new century. So I wrote this function below to be applied to the data which I dput below the function. If I use the function DateCen

[R] Need some help with converting MATLAB .m script to R

2015-06-24 Thread ashwinD12 .
Hello, I have few scripts that have been written in MATLAB. I need to translate or convert them into R. They all deal with reading in a netcdf file and doing some plots. I managed to read in the netcdf file with these API calls # Read input file input_dir = "/home/aan/aa/data/r" file = "

[R] need some help with this example

2013-10-28 Thread Glenn Schultz
I have a class Details that contains information needed by FirstSet to do some calculations then a super class that returns Details and FirstSet.  The problem seems to be in FirstSet where I use the function getAnumber(id).   setClass("Details",          representation(            ID = "charact

Re: [R] Need some help on Text manipulation.

2013-01-15 Thread arun
uot;),unique))  Dat1$att<-ifelse(vec1%in%Replace,vec1,Dat1$att) Dat1$att # [1] "b"  "b"  "b"  "d"  "uu" "t"  "vv" "c"  "a"  "d"  "a"  "b"  "b"  "b"  "b&qu

Re: [R] Need some help on Text manipulation.

2013-01-15 Thread Pascal Oettli
Hi, If you only need "aa" to be replaced by "a", "bb" by "b" and so on, try the following: Dat$att <- as.factor(substr(Dat$att,1,1)) HTH, Pascal Le 15/01/2013 18:48, Christofer Bogaso a écrit : Dear all, Let say I have following data-frame: Dat <- structure(list(dat = c(-0.38779584295632

Re: [R] Need some help reproducing a graph

2012-10-08 Thread Rui Barradas
Hello, Try qq <- qnorm(0.975) x <- 90 + c(-1, 1)*qq*10 f <- function(x) dnorm(x, 90, 10) curve(f, from = 60, to = 120) segments(x, 0, x, f(x)) Hope this helps, Rui Barradas Em 09-10-2012 00:48, dLevy escreveu: Its not homework, it is a seminar exercise that I need to complete in order to l

Re: [R] Need some help reproducing a graph

2012-10-08 Thread dLevy
Its not homework, it is a seminar exercise that I need to complete in order to learn enough in order to take the home exam next month. There are no lecture slides, just a generic textbook in R for bio statistics. Ive been trying to solve this problem for almost a week now but I am stuck. -- View

Re: [R] Need some help reproducing a graph

2012-10-08 Thread Bert Gunter
Homework? We don't do homework here. Bert Sent from my iPhone -- please excuse typos. On Oct 8, 2012, at 4:20 PM, dLevy wrote: > > > > I need to replicate this graph. It is a simple normal distribution-curve > with mean 90 and sd=10. The

Re: [R] Need some help reproducing a graph

2012-10-08 Thread David Winsemius
On Oct 8, 2012, at 2:43 PM, dLevy wrote: > > > > I need to replicate this graph. It is a simple normal distribution-curve > with mean 90 and sd=10. The vertical bars is the 95% confidence limit of the > mean. How on earth do I add those c

[R] Need some help reproducing a graph

2012-10-08 Thread dLevy
I need to replicate this graph. It is a simple normal distribution-curve with mean 90 and sd=10. The vertical bars is the 95% confidence limit of the mean. How on earth do I add those confidence limits? Im thinking something that has to d

[R] need some help with model.matrix

2012-01-30 Thread Daniel Negusse
hello folks, i am learning R and microarray analysis from scratch using different sites. today i am doing an exercise from http://manuals.bioinformatics.ucr.edu/home/R_BioCondManual#R_functions the section i am at is 2. Affymetrix data analysis. I understand the syntax given in this section

Re: [R] Need some help in R : value more than equals to a row.

2009-06-07 Thread Gabor Grothendieck
Try this: t(apply(m, 1, function(x) colMeans(outer(x, x, ">=" On Sun, Jun 7, 2009 at 10:09 AM, suparna mitra wrote: > Hallo, >  I was trying some code, but couldn't make one step of the code properly. > Can anybody  please  help me? > > I have one matrix like this >> values >          [,1]  

Re: [R] Need some help in R : value more than equals to a row.

2009-06-07 Thread Jakson Alves de Aquino
suparna mitra wrote: > Hallo, > I was trying some code, but couldn't make one step of the code properly. > Can anybody please help me? > > I have one matrix like this >> values > [,1] [,2] [,3] [,4] [,5] > [1,] 0.778 0.3611 0. 0.139 0.000

[R] Need some help in R : value more than equals to a row.

2009-06-07 Thread suparna mitra
Hallo, I was trying some code, but couldn't make one step of the code properly. Can anybody please help me? I have one matrix like this > values [,1] [,2] [,3] [,4] [,5] [1,] 0.778 0.3611 0. 0.139 0.000 [2,] 1.000 0. 0.53846154

[R] Need some help in R : value more than equals to a row.

2009-06-07 Thread suparna mitra
Hallo, I was trying some code, but couldn't make one step of the code properly. Can anybody please help me? I have one matrix like this > values [,1] [,2] [,3] [,4] [,5] [1,] 0.778 0.3611 0. 0.139 0.000 [2,] 1.000 0. 0.53846154

[R] need some help finding power in test about variances

2009-04-28 Thread ati sundar
Hello All I am new to this list. I have a problem where for a single sample drawn from normal population, null hypothesis is that variance = k (say). Alternative hypothesis is variance > k. Now if we know the true variance, then I would like to calculate the sample size required to produce cer

[R] Need some help at interfacing R with Fortran-90

2009-03-26 Thread mauede
I browsed through ch.5 of R manual "Writing R extensions". It seems to be written for experienced programmers rathern than for people who occasionally face this problem. A table summarising the main ley points for each supported platform would be very useful. Something like: Supported languages:

Re: [R] need some help about using R for Kaplan-Meier estimator

2009-02-01 Thread Peter Dalgaard
chen chen wrote: Hi Fello: I am asked to compute the Kaplan-Meier estimator of data with right censoring without using surfit(). I.e., a homework problem... For such problem people will at best offer hints. The KM estimator is the ---> cumulative product of ---> decrements that depend

[R] need some help about using R for Kaplan-Meier estimator

2009-02-01 Thread chen chen
Hi Fello: I am asked to compute the Kaplan-Meier estimator of data with right censoring without using surfit(). Does anyone know how to use R to compute the estimators? The data should input X: vector of right-censored observed time for n individuals, and d: vector of failure time indicators (

Re: [R] Need some help in R programming code

2008-11-22 Thread jim holtman
You need to also provide the data that your code is using since the error message indicates that the problem is probably in the way that the object 'a' is defined and there is no indication of what it looks like. You should either provide the output of "str(a)", or the output of 'dput(a)' so we ha

[R] Need some help in R programming code

2008-11-22 Thread saikat sarkar
Dear R guru, I am Saikat Sarkar working as a researcher of Economics in Tampere University, Finland. I am trying to estimate some Garch related tests with Bayesian analysis by R programme. I am not good in R but trying to survive. Anyway I have the coding but not working properly. I have tried

Re: [R] need some help

2008-11-03 Thread bartjoosen
see ?merge Kurapati, Ravichandra (Ravichandra) wrote: > > Hi , > > > >> df > > Session_Setup DCT FwdDataVols_bin countsComp > > 1 User_Initiated NoRLL 1 5058 User_Initiated+NoRLL+1 > > 2 User_Initiated NoRLL 2584 U

[R] need some help

2008-11-03 Thread Kurapati, Ravichandra (Ravichandra)
Hi , > df Session_Setup DCT FwdDataVols_bin countsComp 1 User_Initiated NoRLL 1 5058 User_Initiated+NoRLL+1 2 User_Initiated NoRLL 2584 User_Initiated+NoRLL+2 3 User_Initiated NoRLL 3191 User_Initiated+NoRL

Re: [R] need some help on r

2008-08-29 Thread Nicky Chorley
>>Tdf > > bin TCC_TCA TCA_CR TCC_CR Timesn.rnc > > 117 117 258 27314 (08/28/08 00:09:42) 50.21 > > 118 118 251 30291 (08/28/08 00:09:47) 50.21 > > 119 119 247 28289 (08/28/08 00:09:52) 50.21 > > 120 120 251 29282 (08/28/08 00:09

[R] need some help on r

2008-08-29 Thread Kurapati, Ravichandra (Ravichandra)
Hi >Tdf bin TCC_TCA TCA_CR TCC_CR Timesn.rnc 117 117 258 27314 (08/28/08 00:09:42) 50.21 118 118 251 30291 (08/28/08 00:09:47) 50.21 119 119 247 28289 (08/28/08 00:09:52) 50.21 120 120 251 29

Re: [R] need some help

2008-07-30 Thread jim holtman
I assume that it is testing to see if you are in the interactive mode (typically using RGUI or Rterm) and not a batch file. If it is interactive, it issues a 'stop' (this lets the person take action on the problem). If in the batch, it just terminates the execution of the script. On Wed, Jul 30,

[R] need some help

2008-07-30 Thread Kurapati, Ravichandra (Ravichandra)
Hi Can any body explain the meaning of the following R code if(interactive()) stop(msg, call. = FALSE) else quit() Thanks K.Ravichandra [[alternative HTML version deleted]] __ R-help@r-project.org mailing

[R] need some help in plotting xy graph

2008-05-21 Thread Kurapati, Ravichandra (Ravichandra)
fdf dataframe contains the data as follows "bin" "rate" "overlay" "x" 1 90 "Assign First/cc _from_SN_53 RNC_20_to_SN_50 RNC_21_Success Rate" (04/01/08 16:02:30) 2 93 "Assign First/cc _from_SN_53 RNC_20_to_SN_50 RNC_21_Success Rate" (04/01/08 16:07:30)

[R] need some help in plotting xy graph

2008-05-20 Thread Kurapati, Ravichandra (Ravichandra)
Hi Dataframefdf contains bin rate overlay 1 1 90 Assign First/cc _from_SN_53 RNC_20_to_SN_50 RNC_21_Success Rate 2 2 93 Assign First/cc _from_SN_53 RNC_20_to_SN_50 RNC_21_Success Rate 3 1 90 Assign First/

[R] need some help in plotting xy graph

2008-05-20 Thread Kurapati, Ravichandra (Ravichandra)
Hi Dataframefdf contains bin rate overlay 1 1 90 Assign First/cc _from_SN_53 RNC_20_to_SN_50 RNC_21_Success Rate 2 2 93 Assign First/cc _from_SN_53 RNC_20_to_SN_50 RNC_21_Success Rate 3 1 90 Assign First/cc _from_

Re: [R] Need some help

2007-10-16 Thread J Dougherty
Azza, By "sign changes" are you looking at how long runs of similar results are before switching, e.g. HHTHTTTH sees four changes, while sees just one? JD __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PL

Re: [R] Need some help

2007-10-16 Thread Thomas Lumley
nges, >>> and a plot of sign changes versus toss number (from toss #0 to toss >>> number >>> 1000). The Y axis (number of sign changes, should include negative values >>> of >>> Y) >>> >>> thanks >>> >>> >>> &g

Re: [R] Need some help

2007-10-16 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of azzza > Sent: Tuesday, October 16, 2007 12:49 PM > To: r-help@r-project.org > Subject: Re: [R] Need some help > > > > THANKYOU guyz! yes, Jim's code was right

Re: [R] Need some help

2007-10-16 Thread jim holtman
sum(toss == 1) /length(toss) # assuming heads == 1 On 10/16/07, azzza <[EMAIL PROTECTED]> wrote: > > > THANKYOU guyz! yes, Jim's code was right (it was similar to someone > elses)I somehow missed his reply! > Yes, that was exactly what i was looking for. lastly, how do i find the > frequency o

Re: [R] Need some help

2007-10-16 Thread azzza
THANKYOU guyz! yes, Jim's code was right (it was similar to someone elses)I somehow missed his reply! Yes, that was exactly what i was looking for. lastly, how do i find the frequency of heads perhaps? Marc Schwartz wrote: > > On Tue, 2007-10-16 at 11:53 -0700, azzza wrote: >> >> >> ok

Re: [R] Need some help

2007-10-16 Thread azzza
Thank you guyz. your codes gave me the results I was looking for. And thanks for the reference suggestion. Lastly, how do I code the frequency of heads? Daniel Lakeland wrote: > > On Tue, Oct 16, 2007 at 02:06:47PM -0400, jim holtman wrote: >> If what you are asking for is to see how many ti

Re: [R] Need some help

2007-10-16 Thread Marc Schwartz
On Tue, 2007-10-16 at 11:53 -0700, azzza wrote: > > > ok, so suppose a coin is tossed 1000 times. Each time head occurs, we win a > dollar, otherwise we lose a dollar. Let S(n) be our accumulated winnings > after n tosses. For instance, if the sequence HHHTT occurs in the first five > tosses, th

Re: [R] Need some help

2007-10-16 Thread azzza
Ok, so n= the toss number, and s(n) is the accumulated winnings after n tosses. Now, each time we have a heads, we win a dollar, and each time we have a tails, we lose a dollar. So, s(n) is th sign changes in 1000 tosses. In the beginning, S(0) must be 0, and S(-1) must be zero too. ok, so if on

Re: [R] Need some help

2007-10-16 Thread azzza
ok, so suppose a coin is tossed 1000 times. Each time head occurs, we win a dollar, otherwise we lose a dollar. Let S(n) be our accumulated winnings after n tosses. For instance, if the sequence HHHTT occurs in the first five tosses, then S(5) = $1.00 wheras if the sequence H occurs, S(5) =

Re: [R] Need some help

2007-10-16 Thread Daniel Lakeland
On Tue, Oct 16, 2007 at 02:06:47PM -0400, jim holtman wrote: > If what you are asking for is to see how many times it crosses the > axis when 'accumulating' the values of the top (+1, -1), then the > following will do it - this is for 1000 and shows there are 32 > crossings of the axis. I think wh

Re: [R] Need some help

2007-10-16 Thread roger koenker
You should be reading Feller v1 (p 86, 3rd ed) to see that the number of zero crossings in this process is proportional to sqrt(n) not n. url:www.econ.uiuc.edu/~rogerRoger Koenker email[EMAIL PROTECTED]Department of Economics vox: 217-333-4558Un

Re: [R] Need some help

2007-10-16 Thread jim holtman
gt; >> changes > >> is very low. > >> > >> so basically, i was looking for a code to show the number of sign > >> changes, > >> and a plot of sign changes versus toss number (from toss #0 to toss > >> number > >> 1000). The Y axis (nu

Re: [R] Need some help

2007-10-16 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of azzza > Sent: Tuesday, October 16, 2007 9:06 AM > To: r-help@r-project.org > Subject: Re: [R] Need some help > > > > You are right, I was a bit too vague. I am t

Re: [R] Need some help

2007-10-16 Thread azzza
gt; number >> 1000). The Y axis (number of sign changes, should include negative values >> of >> Y) >> >> thanks >> >> >> >> Daniel Nordlund wrote: >> > >> >> -Original Message- >> >> From: [EMAIL

Re: [R] Need some help

2007-10-16 Thread Marc Schwartz
versus toss number (from toss #0 to toss number > 1000). The Y axis (number of sign changes, should include negative values of > Y) > > thanks > > > > Daniel Nordlund wrote: > > > >> -Original Message- > >> From: [EMAIL PROTECTED]

Re: [R] Need some help

2007-10-16 Thread azzza
> On Behalf >> Of azzza >> Sent: Monday, October 15, 2007 6:06 PM >> To: r-help@r-project.org >> Subject: Re: [R] Need some help >> >> >> >> Thanks Jholtman. >> However, the plot didnt come out the way I envisone dit to be. On the Y >>

Re: [R] Need some help

2007-10-15 Thread Daniel Nordlund
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf > Of azzza > Sent: Monday, October 15, 2007 6:06 PM > To: r-help@r-project.org > Subject: Re: [R] Need some help > > > > Thanks Jholtman. > However, the plot didnt come

Re: [R] Need some help

2007-10-15 Thread azzza
>> >> Another problem I had was trying to simulate an example from my book. >> >> Simulating 1000 coin tosses, and finding the frequency of sign >> changes. >> >> So >> >> how will we plot this using R? (frequency of sign changes in Y

Re: [R] Need some help

2007-10-15 Thread jim holtman
had was trying to simulate an example from my book. > >> Simulating 1000 coin tosses, and finding the frequency of sign changes. > >> So > >> how will we plot this using R? (frequency of sign changes in Y axis) > >> > >> > >> > >> > &

Re: [R] Need some help

2007-10-15 Thread azzza
;> > >> >> -Original Message- >> >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] >> >> On Behalf >> >> Of azzza >> >> Sent: Sunday, October 14, 2007 10:21 PM >> >> To: r-help@r-project.org >> >

Re: [R] Need some help

2007-10-15 Thread jim holtman
riginal Message- > >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > >> On Behalf > >> Of azzza > >> Sent: Sunday, October 14, 2007 10:21 PM > >> To: r-help@r-project.org > >> Subject: [R] Need some help > >> > >> > >

Re: [R] Need some help

2007-10-15 Thread azzza
: > >> -Original Message- >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >> On Behalf >> Of azzza >> Sent: Sunday, October 14, 2007 10:21 PM >> To: r-help@r-project.org >> Subject: [R] Need some help >> >> >> Hi! >> I&#

Re: [R] Need some help

2007-10-14 Thread Daniel Nordlund
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf > Of azzza > Sent: Sunday, October 14, 2007 10:21 PM > To: r-help@r-project.org > Subject: [R] Need some help > > > Hi! > I'm taking a course that requires some programmi

[R] Need some help

2007-10-14 Thread azzza
Hi! I'm taking a course that requires some programming background, but I'm a complete novice in the field. when asked to generate a list of 20 uniform random numbers, is it alright if I put in >randu, and just copy-paste the first 20 numbers?? Or is there, as I suspect, a better way of calling ou