Displaying 20 results from an estimated 2000 matches similar to: "An example (was RE: file connection, while, readLines and bro wser)"
2001 Oct 02
1
problem with while loop with next (was RE: file connection, w hile, readLines and browser)
Dear R-help,
I think I have kinda isolated the problem I had to the following:
i <- 0
while( {i <- i + 1} < 5) {
if(i < 3) next
print(i)
}
This seems to go into an infinite loop. After I break the execution, i has
the value 1.
At the R prompt, if I start from i <- 0 and keep typing {i <- i + 1} < 5, it
eventually evaluate to TRUE. So why does the while loop not work?
2001 Oct 02
1
RE: problem with while loop with next
Prof. Tierney,
Thanks very much for the info.
Why does the loop work if I move the assignment out of the condition? E.g.,
the following works:
i <- 0
while(i < 5) {
i <- i + 1
if(i < 3) next
print(i)
}
Regards,
Andy
> -----Original Message-----
> From: Luke Tierney [mailto:luke at nokomis.stat.umn.edu]
> Sent: Tuesday, October 02, 2001 3:36 PM
> To: Liaw, Andy
2001 Oct 02
0
file connection, while, readLines and browser
Dear R-help,
I have one more question about the functions mentioned in the subject.
Again, the system info is:
platform i386-pc-mingw32
arch x86
os Win32 (OK, it's NT4sp6)
system x86, Win32
status
major 1
minor 3.1
year 2001
month 08
day 31
language R
2001 Jul 16
0
[R] RE: too many arguments in foreign function call
> From: Robert Gentleman [mailto:rgentlem@jimmy.harvard.edu]
>
> Greg,
> you might be better off writing a wrapper,
>
> R->foo where foo has less than 65 args and does nothing more than
> unpack them and calls bar (the original) with as many args as you
> want, not much code change and not much cost...
Hi Rob,
[BTW, sorry about the crosspost
2001 May 30
2
new book
Just thought I would mention that there is a new O'Reilly book out,
"Developing Bioinformatics Computer Skills", which is ok, pretty
superficial about some things but at least it lets you know what is
happening and where.
R gets a few pages in there, 394-396, mostly nice press and accurate
except that Bill Venables (hi Bill) may be surprised to find out that
he is a member of the
2001 May 22
0
Job announcement
I realize this isn't quite the correct forum (but then I don't think
that there is one).
Anyways, I've just been given enough money to hire two programmer for
at least two years to work on the following project:
(for experienced programmers only, please, salary in the 70k range)
BRIEF DESCRIPTION FOR JOB POSTING
To develop a system for the manipulation and analysis of microarray
2001 Oct 17
0
Assignment of structures on a given environment]
Robert Gentleman wrote:
> On Tue, Oct 16, 2001 at 04:40:34PM +0100, Rita Ribeiro wrote:
> > Hi,
> >
> > In order to avoid deep copies by passing large arguments to
functions or
> >
> > returning values, I'm trying to do the assignment of variables in a
> > given environment. The problem is when I try to assign a structure:
a
> > list for example.
2012 Jul 18
2
How to have original (name) order after melt and cast command
Dear R helpers,
I have a data.frame as given below -
dat1 = data.frame(date = as.Date(c("3/30/12","3/29/12","3/28/12","3/27/12","3/26/12",
"3/23/12","3/22/12","3/21/12","3/20/12", "3/30/12","3/29/12","3/28/12","3/27/12",
2001 Apr 11
1
a couple of ideas/proposals
Byron Ellis has been making some progress on a hdf5 library for
microarray data (and any other thing you want to put in there).
In doing so some issues have arisen that are of more general
interest.
1) hdf5 supports annotation (through comments) so it would be nice
if the comment function in R became generic. I think this is
backward compatible and basically not really an issue of any
2008 Dec 10
0
FW: Kegg.db with GOstats
-----Original Message-----
From: Robert Gentleman [mailto:rgentlem@fhcrc.org]
Sent: Wed 10/12/2008 18:47
To: Legaie, Roxane
Subject: Re: Kegg.db with GOstats
Hi Roxanne,
Can you redirect your question to the mailing list. And, you can find the
answer in the mailing list archives...
best wishes
Robert
Legaie, Roxane wrote:
> Dear Robert Gentleman,
> I am currently working on
2010 Feb 10
4
Readjusting the OUTPUT csv file
Dear R helpers
I have some variables say ABC, DEF, PQR, LMN and XYZ. I am choosing any three varaibles at random at a time for my analysis and name these files as input1.csv, input2.csv and input3.csv. So if I choose variables say ABC, DEF and PQR, I am passing the specifications of these variables to input1.csv, input2.csv and input3.csv respectively.
This means in another case even if I
2008 Nov 25
2
dataframe
hi there
I have a dataframe
abc 123 345
abc 345 456
lmn 567 345
hkl 568 535
lmn 096 456
lmn 768 094
i want the uniques of column 1 and there corresponsing column 2 and 3
output
abc 123 345
lmn 567 345
hkl 568 535
cbind(DF1[,1],DF1[which(unique(DF1[,1]),c(2,3)])
but didnt work
kindly let me know how to go abt it
ramya
--
View this message in context:
2010 Jan 18
2
Predict polynomial problem
I have a function that fits polynomial models for the orders in n:
lmn <- function(d,n){
models=list()
for(i in n){
models[[i]]=lm(y~poly(x,i),data=d)
}
return(models)
}
My data is:
> d=data.frame(x=1:10,y=runif(10))
So first just do it for a cubic:
> mmn = lmn(d,3)
> predict(mmn[[3]])
1 2 3 4 5 6 7 8
2009 Oct 13
1
Iterating over file lines
I am attempting to iterate over a file, processing it line by line.
In my function below, I am only getting the first item over and over
and over again from my test file rather than subsequent lines. How
can I modify this to read lines sequentially?
==
iteratefile <- function(file) {
f.con <- file(file)
on.exit(close(f.con))
while( length(readln <- readLines(f.con, 1)) > 0 ) {
2011 Mar 29
3
Reversing order of vector
Dear R helpers
Suppose I have a vector as
vect1 = as.character(c("ABC", "XYZ", "LMN", "DEF"))
> vect1
[1] "ABC" "XYZ" "LMN" "DEF"
I want to reverse the order of this vector as
vect2 = c("DEF", "LMN", "XYZ", "ABC")
Kindly guide
Regards
Vincy
[[alternative HTML
1999 Oct 20
0
[szimeras@irisa.fr: R installation problem]
----- Forwarded message from Stelios Zimeras <szimeras at irisa.fr> -----
Date: Wed, 20 Oct 1999 11:35:52 +0200
From: Stelios Zimeras <szimeras at irisa.fr>
Organization: IRISA, Campus de Beaulieu, 35042 Rennes Cedex, FRANCE
X-Mailer: Mozilla 4.7 [en] (X11; I; SunOS 5.5 sun4m)
X-Accept-Language: en
To: rgentlem at stat.auckland.ac.nz
Subject: R installation problem
Dear Sir,
I try
1999 Nov 01
1
bug in sample (PR#305)
The following appears to be a bug in 0.90
> x<-sample(10,1:4,rep=T)
> x
[1] 8
> ?sample
> x<-sample(10,1:4,rep=T)
> x
[1] 5
Of course, I forgot the syntax but I still don't like the result.
--
+-------------------------------------------------------------------------+
| Robert Gentleman voice: (617) 632-5045 |
| Senior Lecturer
2006 Dec 29
2
Binary AGI Scripts
Hi Everyone,
I'm wondering if anyone here write AGI's in compiled binaries. I'm
writing a small Cepstral AGI in Freepascal/Lazarus. I know there are
some other AGI's out there, but I wanted to add some more functionality
than what is available such as having the AGI determine if the "data"
argument is plain text or a path to a text file and act accordingly.
The
2008 Nov 21
3
list of list objects
hi there,
I have a list of list objects i need to remove the top layer
[[1]]
[1].0
"ABC" "DEF""LMN"
[1].1
"WER" "ERT" "TRY"
[[2]]
[2].0
"ASD","wer""qwe"
[2].1
"wdv""ghj""ggj"
I wanna avoid the top layer...that is [[1]] [[2]] shouldnt be there
just a simple list is wat i need.
2000 Feb 18
0
splitstr problem solved
Hi. Robert Gentleman's solution works. Thanks.
This seems to be a documentation bug; I will submit a separate report to
the bug list for completeness.
Matt
On Sat, 19 Feb 2000, Robert Gentleman wrote:
> On Fri, Feb 18, 2000 at 02:32:54PM -0500, Matthew Wiener wrote:
> > Hi, all.
> >
> > Using the patched version of R-0.99.0, I cannot reproduce the following
>