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:

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

[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

Re: [R] Need some help with regular expression

2016-12-15 Thread David Winsemius
tead as > placeholder. > > Thanks, > Steven > > > From: Steven Nagy [mailto:nst...@gmail.com] > Sent: Monday, December 12, 2016 10:50 PM > To: 'Bert Gunter' <bgunter.4...@gmail.com> > Cc: 'R-help' <r-help@r-project.org> > Subject: RE: [R] Need some help

Re: [R] Need some help with regular expression

2016-12-15 Thread Jeff Newmiller
t;placeholder. > >Thanks, >Steven > > >From: Steven Nagy [mailto:nst...@gmail.com] >Sent: Monday, December 12, 2016 10:50 PM >To: 'Bert Gunter' <bgunter.4...@gmail.com> >Cc: 'R-help' <r-help@r-project.org> >Subject: RE: [R] Need some help with regular expression &

Re: [R] Need some help with regular expression

2016-12-15 Thread Steven Nagy
, December 12, 2016 10:50 PM To: 'Bert Gunter' <bgunter.4...@gmail.com> Cc: 'R-help' <r-help@r-project.org> 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"

Re: [R] Need some help with regular expression

2016-11-20 Thread Bert Gunter
t Gunter [mailto:bgunter.4...@gmail.com] > Sent: Sunday, November 20, 2016 2:15 PM > To: Steven Nagy <nst...@gmail.com> > Cc: R-help <r-help@r-project.org> > Subject: Re: [R] Need some help with regular expression > > If I understand you correctly, I think you are making it m

Re: [R] Need some help with regular expression

2016-11-20 Thread Steven Nagy
..@gmail.com> Cc: R-help <r-help@r-project.org> Subject: Re: [R] Need some help with regular expression 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

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 -> ;

[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:

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

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) }

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

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

[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

[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 =

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.387795842956327,

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

2013-01-15 Thread arun
: [R] Need some help on Text manipulation. Dear all, Let say I have following data-frame: Dat - structure(list(dat = c(-0.387795842956327, -0.23270882099043, -0.89528973290562, 0.95857175595512, 1.61680582493783, -1.17738110289352, 0.210601060411423, -0.827369747447338, -0.36896112964414

[R] Need some help reproducing a graph

2012-10-08 Thread dLevy
http://r.789695.n4.nabble.com/file/n4645492/graph.jpg 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 do

Re: [R] Need some help reproducing a graph

2012-10-08 Thread David Winsemius
On Oct 8, 2012, at 2:43 PM, dLevy wrote: http://r.789695.n4.nabble.com/file/n4645492/graph.jpg 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

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 mans...@hotmail.com wrote: http://r.789695.n4.nabble.com/file/n4645492/graph.jpg I need to replicate this graph. It is a simple normal distribution-curve with mean 90

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. --

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

[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

[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

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 [2,]

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 mitrami...@informatik.uni-tuebingen.de 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

[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

[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:

[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 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 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 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

[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

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

Re: [R] need some help on r

2008-08-30 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:57) 50.21

[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

[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

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

[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) 1 90

[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

Re: [R] Need some help

2007-10-16 Thread Marc Schwartz
Daniel Nordlund wrote: -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 out

Re: [R] Need some help

2007-10-16 Thread azzza
) thanks Daniel Nordlund wrote: -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

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 trying to simulate 1000 coin Tosses

Re: [R] Need some help

2007-10-16 Thread jim holtman
wrote: -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 out the way I

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-4558

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 what

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 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, then

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 times

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, so

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 of heads

Re: [R] Need some help

2007-10-16 Thread Thomas Lumley
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 axis, i should have sign changes in 1000 tosses, the range being from negative to postitive

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

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'm taking a course that requires some programming background, but I'm a complete novice in the field

Re: [R] Need some help

2007-10-15 Thread jim holtman
- 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 programming background, but I'm a complete novice

Re: [R] Need some help

2007-10-15 Thread azzza
changes in Y axis) Daniel Nordlund wrote: -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

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 out the way I envisone dit to be. On the Y

[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

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 programming background, but I'm a complete novice