Displaying 20 results from an estimated 9000 matches similar to: "search path question"
2004 Jan 15
2
A language technical question.
If I have 100 objekts in a folder and I prefer not to load them manually I
wonder how I do this in R if using a for-loop.
I was thinking initially to do something like this:
infiles <- dir(pattern=".RData")
for(i in length(infiles))
{
load(infiles[i])
paste("kalle", i, sep="") <- saveLoadReference
}
But the line
2018 May 25
1
how to make the code more efficient using lapply
Eric's approach seems reasonable to me, and I agree that it's probably not the use of a "for" loop that makes the original version slow. As Eric mentioned, there are lots of unnecessary things happening in the loop.
For example, list.files() was called twice inside the loop, which is unnecessary, and will definitely slow the loop down (though probably not by much). Call it
2007 Sep 19
1
R advice
Dear R-help
As a novice to R I was seeking some advice with respect to using R to
help solve a problem I have.
I have a large number of infiles that need analysed. This can be done, I
believe, using 2 separate R packages (popgen and ape) with the output
from 'popgen' being used as input for 'ape'. What I would like to know
is whether it is possible within R to write some
2006 Nov 25
3
[LLVMdev] LLVM Newb: Getting started
Am Freitag, 24. November 2006 03:00 schrieb Reid Spencer:
> If you're making your own front end, you probably won't need it :)
Well, I wanted to play around with it, so see, how my older programs
perform with it.
So far I managed to get some programs running by folowing scheme:
for src in $infiles; do
llvm-gcc -o $src.bc -c $src ;
opt -f -o $src.bc.opt $src.bc ;
llc -f $src.bc.opt
2007 Jan 26
2
enumerates all possible combinations
Hi all R users,
I want to create a matrix having n columns and 2^n rows, and all its entries
are only 0 or 1. In each row, column i is 0 means dimension i is chosen, 0
means not. The matrix will contains all the possible combination of those n
dimensions.
Here is an example, if n = 3, the matrix will look like:
0 0 0
0 0 1
0 1 0
1 0 0
0 1 1
1 0 1
1 1 1
I know I can use n "for" loops
2004 Nov 24
2
an R function to search on Prof. Baron's site
Inspired by the functions that Barry Rawlingson and Dave Forrest posted for
searching Rwiki and R-help archive, I've made up a function that does the
search on Prof. Baron's site (Thanks to Prof. Baron's help on setting up the
query string!):
RSiteSearch <- function(string, restrict="Rhelp", format="long",
sortby="score",
2004 Dec 23
1
searching Jonathan Baron's R Site
First, my site will be down December 27-28 because of a network
upgrade at Penn. It will also be down at least one day before
that, while I upgrade the operating system. (And another day
some time in January because of a planned power outage.)
Second, I have replaced the search engine in my R site:
http://finzi.psych.upenn.edu/
I am now using Namazu instead of HtDig. The direct link to the
2006 Mar 11
6
is there a formatted output in R?
something like "sprintf" in C?
so I can do:
print(sprintf("the correct result is %3.4f\n", myresult));
-------
Also, I am desperately looking for a "clear console screen" function in
R...
thanks a lot!
[[alternative HTML version deleted]]
2006 May 31
2
R search plug-in
Hi All:
I have written an R search plug-in based on Prof Jonathan Baron's R search site. This Firefox/Netscape plug-in lets you search R sites and R discussion group archives directly from your Mozilla (Seamonkey) or Firefox or Netscape browser. Here is the link to the installer for the plug-in:
http://arinbasu.bravehost.com/installer.html
If you want the source files or have other comments
2009 Sep 30
1
Read header csv file
Hi R community,
First of all, I want to thank everybody to share their time solving R questions, You are great. Ok, for my questions, I've been looking for a solutions by myself, in forums but I'm just a little bit desesperate so I hope somebody can help me. I have built a code to read files from a directory. These files are named by a year (2004.csv, 2005.csv,...). When the code reads
2018 May 25
0
how to make the code more efficient using lapply
Hi Stephen,
I am not sure that the "for loop" is the source of slowness.
You seem to be doing a lot of unnecessary work each time through the loop.
e.g. no need to check if it's the last file, just move that section outside
of the loop.
It will be executed when the loop finishes. As it is you are calling
list.files() each time
through the loop which could be slow.
In any case
2006 Oct 16
1
The old question: R vs MATLAB vs Mathematica vs ...
Hi,
This question seems to be old, however I am asking it from a different point
of view.
R introduces itself as a 'statistical' language and environment. There are
many discussions about comparing R to MATLAB or mathematica (or other
similar software). It seems to me that these other software have a broader
range of applications. For example, in Mathematica one can solve a partial
2012 Jan 15
0
Regression for Rank Order Dependent Variable
Dear colleagues,
I am looking for a package to analyze rank-order data in the form of
regression. My outcome (dependent) variable is a rank ordering in the
sense that the respondents to a questionnaire were asked a single question: to assign the
values 1 to 4 to four different objects (e.g. to rank four cars as best , second best etc). Their first preference was number 1, their second
was
2007 Feb 08
2
path for source()
hello,
i have a couple of .R files distributed about my file system. i commonly source() these from other files, but i have to include the full file path. this is not always convenient if you move files around. is there a way of setting the search path for source()?
thanks a lot!
cheers,
andrew.
--
Andrew B. Collier
Space Physics Group
Hermanus Magnetic Observatory
Honorary Research Fellow
2005 May 10
2
R Greenhouse-Geiser correction?
Is there a function in R for doing Greenhouse-Geiser correction in ANOVA
models?
Is it already available in the aov function? How do we use it?
Best, Darren
[[alternative HTML version deleted]]
2005 Dec 29
1
Glimmix and glm
Hello.
Some months age an e-mail was posted in which a comparison between Glimmix
and glm was discussed. I have not been able to find that e-mail on the R
archive. Does anyone recall the date of the above e-mail?
Thank you very much.
*******************************************
Antonio Paredes
USDA- Center for Veterinary Biologics
Biometrics Unit
510 South 17th Street, Suite 104
Ames, IA 50010
2018 May 25
2
how to make the code more efficient using lapply
Dear All,
I have a following for-loop code which is basically intended to read in
many excel files (each file has many columns and rows) in a directory and
extract the some rows and columns out of each file and then combine them
together into a dataframe. I use for loop which can do the work but quite
slow. How to make it faster using lapply function ? Thanks in advance!
temp.df<-c() #
2006 Oct 07
2
gregexpr in R 2.3.0 != gregexpr in R 2.4.0
Hi all
I have a question regarding differences in the way gregpexr works in R 2.3.0 and R 2.4.0.
In R 2.3.0, this is what happens:
> gregexpr(" [a-z] [a-z] ", " a b c d e f ", perl=T)
[[1]]
[1] 1 3 5 7 9
attr(,"match.length")
[1] 5 5 5 5 5
... while in R 2.4.0, this is what happens:
> gregexpr(" [a-z] [a-z] ", " a b c d e f ", perl=T)
2007 Nov 15
2
how can I use awk to match? pls help
Hi all
I don't have idea how to write this script, please
help
I have thousand records in this format. eg: file No.3
is
File No: 003
Customer: Ann
Email address: xxx at info
Country: England
Created by: 20071102
file No. 4 is:
File No: 004
Customer: James
Email address: xxx at gov
Country: Australia
Created by: 20071105
I need to write a
2006 Apr 18
1
predict.nls confidence intervals
Hello-
It has been several years since anyone has asked, so i am asking again- has anyone created a routine to estimate confidence intervals for predictions from nls models (ala Bates and Watts 1988)?
Thanks -
Alice Shelly
[[alternative HTML version deleted]]