Re: [R] (i want change G3 and G2 to variable tke all elements in rows) (truth[(truth[, 1]=="G3" & truth[, 2]=="G2") | (truth[, 1]=="G2" & truth[, 2]=="G3"), 3]<-1

2020-09-06 Thread PIKAL Petr
Hi You still fail to send your message in plain text, so it is unreadable. If I managed to decipher it correctly what you wanted you probably could set 2 related logical expression and considering that FALSE is 0 and TRUE is 1 you get desired result. Cheers Petr > -Original Message- >

[R] (i want change G3 and G2 to variable tke all elements in rows) (truth[(truth[, 1]=="G3" & truth[, 2]=="G2") | (truth[, 1]=="G2" & truth[, 2]=="G3"), 3]<-1

2020-09-06 Thread Hesham A. AL-bukhaiti via R-help
helloout<-read.csv("outbr.csv")truth<-out[,seq(1,2)]for example :  If row1= G1 and row2=G2 , and row 1 = G2 and row 2= G1,make G3=1 # note G1 and G2 are values from 1 to 2000 #if this happend add to thrid column in truth 1 otherwise add 0 as in statment follow truth<-cbind(as.character(truth[,1])

Re: [R] dataRetrieval: whatNWISdata() return value type

2020-09-06 Thread Rich Shepard
On Sun, 6 Sep 2020, Bill Dunlap wrote: https://help.waterdata.usgs.gov/codes-and-parameters/codes - *Time series identifier* - A 5-6 digit number (ts_id) which uniquely identifies a series of data for one parameter at one location at a continuous-recording data site. The ts_id is used by

Re: [R] dataRetrieval: whatNWISdata() return value type

2020-09-06 Thread Bill Dunlap
https://help.waterdata.usgs.gov/codes-and-parameters/codes - *Time series identifier* - A 5-6 digit number (ts_id) which uniquely identifies a series of data for one parameter at one location at a continuous-recording data site. The ts_id is used by the database for selecting data for

[R] dataRetrieval: whatNWISdata() return value type

2020-09-06 Thread Rich Shepard
The dataRetrieval package PDF has a list of values returned by whatNWISdata(). One value returned when I run this function is not on the list and my searches of USGS web sites doesn't find it. The value's name is "ts_id". A pointer to where that's defined is needed. Regards, Rich __

Re: [R] dataRetrieval query error

2020-09-06 Thread Rich Shepard
On Sat, 5 Sep 2020, Bill Dunlap wrote: Name all your arguments (the vignette gets this wrong), including siteNumber=siteNumbers. Also, the vignette uses 'statCd', not 'statCD'. Bill, Thanks very much. I missed these. dataAvailable <- whatNWISdata(siteNumber=siteNumbers, service="all", statC

Re: [R] dataRetrieval query error [RESOLVED]

2020-09-06 Thread Rich Shepard
On Sat, 5 Sep 2020, David Winsemius wrote: This worked: dataAvailable <- whatNWISdata(siteNumber=siteNumbers) David/Bert, Mea culpa! The vignette example used a single siteNumber which is also the variable name and I missed that last point. Thank you very much. Regards, Rich

Re: [R] dataRetrieval query error

2020-09-06 Thread Rich Shepard
On Sat, 5 Sep 2020, Bert Gunter wrote: You failed to name the first parameter, siteNumbers? Bert, siteNumbers <- c("14207920","14208000","14208200","14208300","14208500","14208600","14208700","14208850","14209000","14209100","14209250","14209500","14209600","14209670","14209700","14209710","

Re: [R] truth[(truth[, 1]=="G3" & truth[, 2]=="G2") | (truth[, 1]=="G2" & truth[, 2]=="G3"), 3]<-1

2020-09-06 Thread Michael Dewey
I am afraid this is completely unreadable because you posted in HTML ad this is a plain text list. Best to resend it having set your mailer to send plain text as HTML gets mangled here. Michael On 06/09/2020 10:58, Hesham A. AL-bukhaiti via R-help wrote: helloout<-read.csv("outbr.csv")truth<-

[R] truth[(truth[, 1]=="G3" & truth[, 2]=="G2") | (truth[, 1]=="G2" & truth[, 2]=="G3"), 3]<-1

2020-09-06 Thread Hesham A. AL-bukhaiti via R-help
helloout<-read.csv("outbr.csv")truth<-out[,seq(1,2)]for example :  If row1= G1 and row2=G2 , and row 1 = G2 and row 2= G1,make G3=1 # note G1 and G2 are values from 1 to 2000 #if this happend add to thrid column in truth 1 otherwise add 0 as in statment follow truth<-cbind(as.character(truth[,1])