Re: [R] Naming output file

2024-06-24 Thread avi.e.gross
I had the same FIRST impression which could have made sense as in writing
the data back out to a file with a similar name and that would have been
trivial. I mean if you had exactly three, a loop would not even be
particularly useful versus writing two lines, copying them and editing the
latter two sets.

But the OP could have done a better job explaining what they wanted it all
FOR. Just writing out the same file contents would be nonsensical unless
some change was made such as writing in a different format. But I noted the
output names were not something like NAME.csv and although the code looked
wrong, it soon became clear they wanted to create not files but clearly a
data.frame as that is produced by read.csv. The language usage was simply
sloppy.

The names chosen made it easier as all you needed to do was replace
"2010midata" with "bop" and easy enough to do in a loop or several other
ways but what the OP missed was how to do something that is doable in an
interpreted language like R but possibly not in many compiled languages.

So, as others pointed out, sometimes the person doing this has become wedded
to ONE WAY of doing something rather than considering if some other way is a
better choice. In this case, a consensus is that a data structure such as a
list of data.frames would be a better choice and even that it could be done
without an explicit loop such as this version where you can set N to any
value, and it will get files with a suffix ranging from 1 to N, albeit this
does not allow you to find something like 007 without modification:

N <- 3
list_of_df <- lapply(paste0("2010midata", 1:N, ".csv"), read.csv)

An individual data.frame can be accessed using [[]] notation as in:

> class(list_of_df[[1]])
[1] "data.frame"

Of course if you have additional values to pass in to read.csv, add them in
the ... after the first args and so on. 

The next part, badly written as:

paste0("bop",im)<-boprobit(eqs,mydata,wt=weight,method="BHHH",tol=0,reltol=0
,gradtol=1e-5,Fisher=TRUE)

Not can use a similar construction in which the 1:N is replaced by
list_of_df and the function by boprobit and then the remaining arguments in
the ...

But that is not the way many initially think. Let alone thinking in nested
fashion as in:

Results <- lapply(X=lapply(X=paste0("2010midata", 1:N, ".csv"),
FUN=read.csv), FUN=boprobit,
,wt=weight,method="BHHH",tol=0,reltol=0,gradtol=1e-5,Fisher=TRUE))

Unfortunately, the latter is WRONG as boprobit seems to take a second
argument of the data.frame with whatever "eqs" is as the first argument.
This slightly nonstandard version would require some gimmick such as an
accessory function that rearranges what it gets as arguments and then calls
boprobit.

But, as noted, this is one of many examples where the user comes up with a
"solution" that is fairly rarely needed even if it can be done, rather than
one that is a bit more abstract and yet powerful. 

Yet, as noted, R can do things we often have no need for and this is an
example. Never mind how it can be a tad dangerous to assign to extra
variable names that might step on existing names as compared to creating
anonymous data structures with few or no names as everything is largely
positional.

I will end with a slight variant. Imagine making a named list, perhaps
extended in each part of the loop used, so that you it looks like

Mylist <- list(name1=value, name2=value, name3=value)

This could then be addressed using Mylist[[1]] or Mylist$name1
interchangeably. But as all names would be internal to the list, it is
name-safe.


-Original Message-
From: R-help  On Behalf Of Richard O'Keefe
Sent: Monday, June 24, 2024 9:05 PM
To: Steven Yen 
Cc: R-help Mailing List ; Steven Yen

Subject: Re: [R] Naming output file

The subject line says (capitalisation changed) "name output FILE"
but I see no attempt in the sample code to create an output FILE.
I was expecting to see something like
  write(, file = paste0("bop",im))

On Mon, 24 Jun 2024 at 23:41, Steven Yen  wrote:
>
> I would like a loop to
>
> (1) read data files 2010midata1,2010midata2,2010midata3; and
>
> (2)  name OUTPUT bop1,bop2,bop3.
>
> I succeeded in line 3 of the code below,
>
> BUT not line 4. The error message says:
>
> Error in paste0("bop", im) <- boprobit(eqs, mydata, wt = weight, method
> = "NR", : target of assignment expands to non-language object Please
> help. Thanks.
>
> m<-3
> for (im in 1:m) {
> mydata<-read.csv(paste0("2010midata",im,".csv"))
>
paste0("bop",im)<-boprobit(eqs,mydata,wt=weight,method="BHHH",tol=0,reltol=0
,gradtol=1e-5,Fisher=TRUE)
> }
>
>
>
> [[alternative HTML version deleted]]
>
> 

Re: [R] Naming output file

2024-06-24 Thread Richard O'Keefe
The subject line says (capitalisation changed) "name output FILE"
but I see no attempt in the sample code to create an output FILE.
I was expecting to see something like
  write(, file = paste0("bop",im))

On Mon, 24 Jun 2024 at 23:41, Steven Yen  wrote:
>
> I would like a loop to
>
> (1) read data files 2010midata1,2010midata2,2010midata3; and
>
> (2)  name OUTPUT bop1,bop2,bop3.
>
> I succeeded in line 3 of the code below,
>
> BUT not line 4. The error message says:
>
> Error in paste0("bop", im) <- boprobit(eqs, mydata, wt = weight, method
> = "NR", : target of assignment expands to non-language object Please
> help. Thanks.
>
> m<-3
> for (im in 1:m) {
> mydata<-read.csv(paste0("2010midata",im,".csv"))
> paste0("bop",im)<-boprobit(eqs,mydata,wt=weight,method="BHHH",tol=0,reltol=0,gradtol=1e-5,Fisher=TRUE)
> }
>
>
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Naming output file

2024-06-24 Thread Fer Arce via R-help

Hi, try with:


m<-3
for (im in 1:m) {
mydata<-read.csv(paste0("2010midata",im,".csv"))
assign(paste0("bop",im),boprobit(eqs,mydata,wt=weight,method="BHHH",tol=0,reltol=0,gradtol=1e-5, 
Fisher=TRUE)

}

cheers
F.

On 6/24/24 06:41, Steven Yen wrote:

I would like a loop to

(1) read data files 2010midata1,2010midata2,2010midata3; and

(2)  name OUTPUT bop1,bop2,bop3.

I succeeded in line 3 of the code below,

BUT not line 4. The error message says:

Error in paste0("bop", im) <- boprobit(eqs, mydata, wt = weight, method
= "NR", : target of assignment expands to non-language object Please
help. Thanks.

m<-3
for (im in 1:m) {
mydata<-read.csv(paste0("2010midata",im,".csv"))
paste0("bop",im)<-boprobit(eqs,mydata,wt=weight,method="BHHH",tol=0,reltol=0,gradtol=1e-5,Fisher=TRUE)
}



[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Naming output file

2024-06-24 Thread Steven Yen

Thanks to all. Editing the line to the following worked:

ame<-ame.bopa(get(paste0("bop",im)),y1.level=y1value,y2.level=y2value,jindex=jindex1,vb.method="invH",joint12=TRUE,
    printing=FALSE,testing=TRUE)

On 6/24/2024 9:00 PM, Ivan Krylov wrote:

В Mon, 24 Jun 2024 20:16:46 +0800
Steven Yen  пишет:


In the call to ame.bopa in a loop, I like inputs in the call to
ame.bopa to be bop1, bop2, bop3,... Thanks.

for (im in 1:m) {
ame<-ame.bopa(bop,y1.level=y1value,y2.level=y2value,jindex=jindex1,vb.method="invH",joint12=TRUE,
      printing=FALSE,testing=TRUE)
}

Use get(paste0('bop', im)) to read a variable named paste0('bop', im).

If you used a list like suggested by Rui, you would be able to use the
same syntax for read and write access, namely, bop[[im]], instead of
manually assigning variables using assign(name, value) and manually
reading variables using get(name).



__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Naming output file

2024-06-24 Thread Ben Bolker
  As stated earlier in the thread, this is where you would need to use 
get(paste0("bop", im)) [the analogue of assign].  This unwieldiness is 
the exact reason that several posters are encouraging you to change your 
approach and store these objects in a list ...



On 2024-06-24 8:16 a.m., Steven Yen wrote:

Great, thanks. Eric's suggestion is the most simple. Here's a resulting
problem. In the call to ame.bopa in a loop, I like inputs in the call to
ame.bopa to be bop1, bop2, bop3,... Thanks.

for (im in 1:m) {
ame<-ame.bopa(bop,y1.level=y1value,y2.level=y2value,jindex=jindex1,vb.method="invH",joint12=TRUE,
      printing=FALSE,testing=TRUE)
}

On 6/24/2024 7:57 PM, Eric Berger wrote:

assign(paste0("bop",im),boprobit(eqs,mydata,wt=weight,method="BHHH",tol=0,reltol=0,gradtol=1e-5,Fisher=TRUE))


On Mon, Jun 24, 2024 at 2:56 PM Steven Yen  wrote:

 Thanks Eric. I am not following your suggested line. Would you
 just edit my line 4? Thanks.

 On 6/24/2024 7:51 PM, Eric Berger wrote:

 How about

 assign(paste0("bop",im), boprobit( etc ))



 On Mon, Jun 24, 2024 at 2:41 PM Steven Yen  wrote:

 I would like a loop to

 (1) read data files 2010midata1,2010midata2,2010midata3; and

 (2)  name OUTPUT bop1,bop2,bop3.

 I succeeded in line 3 of the code below,

 BUT not line 4. The error message says:

 Error in paste0("bop", im) <- boprobit(eqs, mydata, wt =
 weight, method
 = "NR", : target of assignment expands to non-language object
 Please
 help. Thanks.

 m<-3
 for (im in 1:m) {
 mydata<-read.csv(paste0("2010midata",im,".csv"))
 
paste0("bop",im)<-boprobit(eqs,mydata,wt=weight,method="BHHH",tol=0,reltol=0,gradtol=1e-5,Fisher=TRUE)
 }



         [[alternative HTML version deleted]]

 __
 R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 
 and provide commented, minimal, self-contained, reproducible
 code.


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


--
Dr. Benjamin Bolker
Professor, Mathematics & Statistics and Biology, McMaster University
Director, School of Computational Science and Engineering
(Acting) Graduate chair, Mathematics & Statistics
> E-mail is sent at my convenience; I don't expect replies outside of 
working hours.


__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Naming output file

2024-06-24 Thread Ivan Krylov via R-help
В Mon, 24 Jun 2024 20:16:46 +0800
Steven Yen  пишет:

> In the call to ame.bopa in a loop, I like inputs in the call to 
> ame.bopa to be bop1, bop2, bop3,... Thanks.
> 
> for (im in 1:m) {
> ame<-ame.bopa(bop,y1.level=y1value,y2.level=y2value,jindex=jindex1,vb.method="invH",joint12=TRUE,
>      printing=FALSE,testing=TRUE)
> }

Use get(paste0('bop', im)) to read a variable named paste0('bop', im).

If you used a list like suggested by Rui, you would be able to use the
same syntax for read and write access, namely, bop[[im]], instead of
manually assigning variables using assign(name, value) and manually
reading variables using get(name).

-- 
Best regards,
Ivan

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Naming output file

2024-06-24 Thread Steven Yen
Great, thanks. Eric's suggestion is the most simple. Here's a resulting 
problem. In the call to ame.bopa in a loop, I like inputs in the call to 
ame.bopa to be bop1, bop2, bop3,... Thanks.

for (im in 1:m) {
ame<-ame.bopa(bop,y1.level=y1value,y2.level=y2value,jindex=jindex1,vb.method="invH",joint12=TRUE,
     printing=FALSE,testing=TRUE)
}

On 6/24/2024 7:57 PM, Eric Berger wrote:
> assign(paste0("bop",im),boprobit(eqs,mydata,wt=weight,method="BHHH",tol=0,reltol=0,gradtol=1e-5,Fisher=TRUE))
>
>
> On Mon, Jun 24, 2024 at 2:56 PM Steven Yen  wrote:
>
> Thanks Eric. I am not following your suggested line. Would you
> just edit my line 4? Thanks.
>
> On 6/24/2024 7:51 PM, Eric Berger wrote:
>> How about
>>
>> assign(paste0("bop",im), boprobit( etc ))
>>
>>
>>
>> On Mon, Jun 24, 2024 at 2:41 PM Steven Yen  wrote:
>>
>> I would like a loop to
>>
>> (1) read data files 2010midata1,2010midata2,2010midata3; and
>>
>> (2)  name OUTPUT bop1,bop2,bop3.
>>
>> I succeeded in line 3 of the code below,
>>
>> BUT not line 4. The error message says:
>>
>> Error in paste0("bop", im) <- boprobit(eqs, mydata, wt =
>> weight, method
>> = "NR", : target of assignment expands to non-language object
>> Please
>> help. Thanks.
>>
>> m<-3
>> for (im in 1:m) {
>> mydata<-read.csv(paste0("2010midata",im,".csv"))
>> 
>> paste0("bop",im)<-boprobit(eqs,mydata,wt=weight,method="BHHH",tol=0,reltol=0,gradtol=1e-5,Fisher=TRUE)
>> }
>>
>>
>>
>>         [[alternative HTML version deleted]]
>>
>> __
>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> 
>> and provide commented, minimal, self-contained, reproducible
>> code.
>>
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Naming output file

2024-06-24 Thread Steven Yen
Thanks Eric. I am not following your suggested line. Would you just edit 
my line 4? Thanks.

On 6/24/2024 7:51 PM, Eric Berger wrote:
> How about
>
> assign(paste0("bop",im), boprobit( etc ))
>
>
>
> On Mon, Jun 24, 2024 at 2:41 PM Steven Yen  wrote:
>
> I would like a loop to
>
> (1) read data files 2010midata1,2010midata2,2010midata3; and
>
> (2)  name OUTPUT bop1,bop2,bop3.
>
> I succeeded in line 3 of the code below,
>
> BUT not line 4. The error message says:
>
> Error in paste0("bop", im) <- boprobit(eqs, mydata, wt = weight,
> method
> = "NR", : target of assignment expands to non-language object Please
> help. Thanks.
>
> m<-3
> for (im in 1:m) {
> mydata<-read.csv(paste0("2010midata",im,".csv"))
> 
> paste0("bop",im)<-boprobit(eqs,mydata,wt=weight,method="BHHH",tol=0,reltol=0,gradtol=1e-5,Fisher=TRUE)
> }
>
>
>
>         [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> 
> and provide commented, minimal, self-contained, reproducible code.
>
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Naming output file

2024-06-24 Thread Rui Barradas

Às 12:41 de 24/06/2024, Steven Yen escreveu:

I would like a loop to

(1) read data files 2010midata1,2010midata2,2010midata3; and

(2)  name OUTPUT bop1,bop2,bop3.

I succeeded in line 3 of the code below,

BUT not line 4. The error message says:

Error in paste0("bop", im) <- boprobit(eqs, mydata, wt = weight, method
= "NR", : target of assignment expands to non-language object Please
help. Thanks.

m<-3
for (im in 1:m) {
mydata<-read.csv(paste0("2010midata",im,".csv"))
paste0("bop",im)<-boprobit(eqs,mydata,wt=weight,method="BHHH",tol=0,reltol=0,gradtol=1e-5,Fisher=TRUE)
}



[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Hello,

Here are two ways, with a for loop and with a lapply loop.


# for loop
m <- 3
# create the input filenames in one instruction
INPUT <- paste0("2010midata", seq.int(m), ".csv")
# create a named list with m elements to store the output
OUTPUT <- vector("list", length = m) |> setNames(paste0("bop", seq.int(m)))
for(i in seq.int(m)) {
  mydata <- read.csv(INPUT[[i]])
  OUTPUT[[i]] <- boprobit(eqs, mydata, wt=weight, method="BHHH",
  tol=0, reltol=0, gradtol=1e-5, Fisher=TRUE)
}



# lapply loop
m <- 3
# create the input filenames in one instruction
INPUT <- paste0("2010midata", seq.int(m), ".csv")
# no need to create the output list, it will be the
# return value of lapply
OUTPUT <- lapply(INPUT, \(f) {
  mydata <- read.csv(f)
  boprobit(eqs, mydata, wt=weight, method="BHHH",
   tol=0, reltol=0, gradtol=1e-5, Fisher=TRUE)
})
# assign the output list's names
names(OUTPUT) <- paste0("bop", seq.int(m))


Hope this helps,

Rui Barradas


--
Este e-mail foi analisado pelo software antivírus AVG para verificar a presença 
de vírus.
www.avg.com

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Naming output file

2024-06-24 Thread Eric Berger
assign(paste0("bop",im),boprobit(eqs,mydata,wt=weight,method="BHHH",tol=0,reltol=0,gradtol=1e-5,Fisher=TRUE))


On Mon, Jun 24, 2024 at 2:56 PM Steven Yen  wrote:

> Thanks Eric. I am not following your suggested line. Would you just edit
> my line 4? Thanks.
> On 6/24/2024 7:51 PM, Eric Berger wrote:
>
> How about
>
> assign(paste0("bop",im), boprobit( etc ))
>
>
>
> On Mon, Jun 24, 2024 at 2:41 PM Steven Yen  wrote:
>
>> I would like a loop to
>>
>> (1) read data files 2010midata1,2010midata2,2010midata3; and
>>
>> (2)  name OUTPUT bop1,bop2,bop3.
>>
>> I succeeded in line 3 of the code below,
>>
>> BUT not line 4. The error message says:
>>
>> Error in paste0("bop", im) <- boprobit(eqs, mydata, wt = weight, method
>> = "NR", : target of assignment expands to non-language object Please
>> help. Thanks.
>>
>> m<-3
>> for (im in 1:m) {
>> mydata<-read.csv(paste0("2010midata",im,".csv"))
>>
>> paste0("bop",im)<-boprobit(eqs,mydata,wt=weight,method="BHHH",tol=0,reltol=0,gradtol=1e-5,Fisher=TRUE)
>> }
>>
>>
>>
>> [[alternative HTML version deleted]]
>>
>> __
>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Naming output file

2024-06-24 Thread Ivan Krylov via R-help
В Mon, 24 Jun 2024 19:41:10 +0800
Steven Yen  пишет:

> (2)  name OUTPUT bop1,bop2,bop3.
> 
> I succeeded in line 3 of the code below,
> 
> BUT not line 4. The error message says:
> 
> Error in paste0("bop", im) <- boprobit(eqs, mydata, wt = weight,
> method = "NR", : target of assignment expands to non-language object
> Please help. Thanks.

If you really want to generate variable names and assign then in the
global environment programmatically, you can use assign(paste0("bop",
im), boprobit(...)), but I wouldn't recommend to do this. When there's
a thousand of these files, would you really want to have 1000 variables
and access them in a similarly awkward fashion using get(variablename)?

Your analysis results are clearly related and form a sequence. Why not
put them in a list?

bop <- list()
# or: be a good citizen and preallocate the list
bop <- vector('list', 3)

# instead of assign(...):
bop[[im]] <- boprobit(...)

This way you can still address the individual elements of the sequence
using bop[[1]], bop[[2]], bop[[3]], but you can also operate on the
whole sequence, e.g., save it to a file using saveRDS(bop, 'bop.rds').
Lists also compose better with lapply(), parLapply(), and many other
functions that operate on collections of R objects.

-- 
Best regards,
Ivan

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Naming output file

2024-06-24 Thread Eric Berger
How about

assign(paste0("bop",im), boprobit( etc ))



On Mon, Jun 24, 2024 at 2:41 PM Steven Yen  wrote:

> I would like a loop to
>
> (1) read data files 2010midata1,2010midata2,2010midata3; and
>
> (2)  name OUTPUT bop1,bop2,bop3.
>
> I succeeded in line 3 of the code below,
>
> BUT not line 4. The error message says:
>
> Error in paste0("bop", im) <- boprobit(eqs, mydata, wt = weight, method
> = "NR", : target of assignment expands to non-language object Please
> help. Thanks.
>
> m<-3
> for (im in 1:m) {
> mydata<-read.csv(paste0("2010midata",im,".csv"))
>
> paste0("bop",im)<-boprobit(eqs,mydata,wt=weight,method="BHHH",tol=0,reltol=0,gradtol=1e-5,Fisher=TRUE)
> }
>
>
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.