Displaying 20 results from an estimated 10000 matches similar to: "Efficiency of for-loop in R"
2007 Jan 09
4
A question about R environment
Hi all,
I created environment "mytoolbox" by : mytoolbox <- new.env(parent=baseenv())
Is there anyway I put it in the search path ?
If you need some background :
In a project, I often write some small functions, and load them into my workspace directly, so when I list the objects
with ls(), it looks pretty messy. So I am wondering if it is possible to creat an
2006 Sep 27
2
How to pass expression as an argument
Hi,
I am writing a function and need to pass a function expression as an argument, for instance,
myfun <- function( express) {
x<- c(1,2,3)
y<-express
}
if I call the above function by myfun( x*2 ), I get 2 as the result, instead of 2,4,6 , could someone help me to
fix this problem ?
Furthermore, is that
2003 Dec 23
4
Merry Christmas, all Asterisk users!
It's the day before Christmas here in Sweden, actually the night before at this time...
We celebrate Xmas on the 24th, so I'm about to log off and switch my Asterisk into
"merry-christmas-mode" with the yet undocumented CLI command "frosty-mode on", a mode
where the PBX will connect all incoming extensions to the "ho-ho-ho" sound file and then randomly
pick a
2009 Jan 08
1
Respuesta automática
Xmas Gifts<br>
<br>
My dear friends,Greetings from Doublewin-trade working team.<br> <br> I hope every thing is going on with you!Here,Thanks a lot for your support to us . We prepared some wonderful gifts for you!<br> It seems that Christmas time is here once again, and it is time again to bring in the New Year. I wish you enjoy the Merry Christmas and your
2007 Feb 02
2
A question about dput
Hi,
I am trying to output a R data set for use in WinBugs, I used
dput(list(x=rnorm(100),N=100),file="bug.dat")
But I can't get the intended format: list(x=c(.......),N=100), instead, I got
something like this (copied the first two lines):
[00000000]???73?74?72?75??63?74?75?72??65?28?6C?69??73?74?28?78???? structure(list(x
2007 Jan 14
1
Questions about paste and assign
Hi,
I would like to assign a value to a member b of the list a in position 3, by calling:
assign( target, 2.34, 3)
My question is what the "target" should be. I tried target <- paste("a", $, "b") and something else,
but haven't got the right answer yet.
BTW, if I attached a list named
2007 Apr 01
1
Keep R packages in the R installation
Hi,
I just got a quick question here, when I install a new version of R , is there an easy to keep the installed R packages ?
Thanks a lot for any help.
tong
2005 Jun 28
2
How to import data as numeric array?
Did some search but couldn't find useful result.
I am trying to read a n*m dimension data with read.table, what i need is a numeric array,
is there any efficient way to allow me get this array directly instead of a list?
I tried to use as.array() to change the mode, but seems it doesn't work and i got this error message:
"Error in "dimnames<-.data.frame"(`*tmp*`,
2004 Dec 23
3
tcltk problem
Hi all,
I have R Version 2.1.0 installed on a box running Redhat Fedora Core 2.
When I try:
library()
it shows the package tcltk.
But if I try:
library(tcltk) I get the same error message like in this thread:
http://tolstoy.newcastle.edu.au/R/help/01c/3418.html
The same, tcl and tk are installed in /usr/lib; if I try:
capabilities("tcltk")
I get:
tcltk
FALSE
I cant' find tcltk.so
2004 Dec 23
3
tcltk problem
Hi all,
I have R Version 2.1.0 installed on a box running Redhat Fedora Core 2.
When I try:
library()
it shows the package tcltk.
But if I try:
library(tcltk) I get the same error message like in this thread:
http://tolstoy.newcastle.edu.au/R/help/01c/3418.html
The same, tcl and tk are installed in /usr/lib; if I try:
capabilities("tcltk")
I get:
tcltk
FALSE
I cant' find tcltk.so
2009 Dec 23
1
removing rows with NAs in anywere
Dear all,
I have a data.frame with some NAs that can
happens anywere, and I would like to keep
only rows without NAs. Thanks in advance
for your help, and Merry Xmas.
myvect<-runif(100)
myvect[sample(1:100)[1:5]]<-NA
myDF<-data.frame(matrix(myvect,ncol=5))
myDF
miltinho
[[alternative HTML version deleted]]
2011 Dec 23
1
simple ggplot2 question
Hello,
I am trying to make a plot using the code below. The plot is divided into two parts, using facet_grid. I would like the vertical axis (labelled 'place') to be different for each location (=part). So in the upper part, only places 'n' through 'z' are shown, while in the lower part, only places 'a' through 'm' are shown. I thought 'free_y'
2007 Apr 02
2
Compiling C codes in Windows
Hi All,
I have been struggling to figure out how to compile c codes for R use. I am using Win XP + Cygwin + R binaries.
After I followed all the instructions in " Building R for Windows" from Murdoch's website, I tried to Run something like :
R CMD SHLIB C:\R\test.c , but still didn't get any output.
My first question is, does this mean I already did
2007 Apr 02
2
Compiling C codes in Windows
Hi All,
I have been struggling to figure out how to compile c codes for R use. I am using Win XP + Cygwin + R binaries.
After I followed all the instructions in " Building R for Windows" from Murdoch's website, I tried to Run something like :
R CMD SHLIB C:\R\test.c , but still didn't get any output.
My first question is, does this mean I already did
2006 Mar 17
1
How to change the label in plot.ts ?
Hi you guys:
I have been wondering if there is any way to change the labeling in plot.ts( ), for example , if I plot two sequences,
i always got y labels as "series1", "series2", I tried to use ylab=c((expression(mu_1)),(expression(mu_2))), but it
doesn't work.
thanks in advance for any help
best.
2006 Oct 28
1
A quesiton on data manipulation
Hi,
I have a data set (data frame) describing some features of the students in a high school in the following format:
Stu ID Year feature 1 feature 2 .............
1001 1990
1001 1991
1001 1992
1002 1990
1002 1991
1002 1992
Some features of a few of these students are missing, I would like to
2007 Jan 04
1
need help with debug package
Hi all,
I met a problem while using the debug package, I have the following program:
mainfun<- function(){
beta<-1
result<-subfun(beta+x)
}
subfun<-function(expr){
y <- eval(expr, envir=list(x=c(1,2)),enclos = parent.frame())
return(y)
}
I have no problem using this program without calling the debug
2009 Dec 27
4
how to create a simple loop ?
I have a 5-row matrix called “data”. There are headers.
it look like this :
Row 1 Row2 Row3 Row4 Row5
Line1 … … … …
Line2 … … … …
Line3 … … … …
…
Line 1838 … … … …
I want to calculate several simple arithmetic means for Row5, that
2004 Dec 17
0
[Off Topic] humour, XMAS, ground loop - good business strategy
hi, I received this e-mail which contains a "ballad", at first I thought it
was junk mail, but then I read through it, for the EE members of this list,
it may be quite humorous.
I don't know if the ballad is original, but at least it's the XMAS season,
so it's something to lighten up your day, eh?
-samudra
""" How the Ground Loop Stole Christmas
2003 Dec 22
2
R-devel with Darwin: some issues (mostly due to latest R.framework changes)
Some issues with the recent R-devel (rsync today) on Darwin:
1) Recent R-devel is a bit misleading concerning the R-framework
installation:
A new option --enable-R-framework was introduced, but
install-Rframework ignores its absence (or --disable-R-framework for
that matter) and tries to install the framework anyway in / which fails
just after the R itself was copied into /Versions/.... I