Hi all,
I want to install some packages in R in a computer where I haven't root
privilegues, and R is already installed. The system manager is extremely
busy and at the moment I'm afraid that I have to manage my own
installations.
So, I am trying to install 'quadprog' and I'm getting the message:
Hi,
I've just installed R 2.10.1 for linux, and html help has not been built
(just the index page of each package but not the documentation for the
individual functions in the packages.
I cannot see any flag in the ./configure to set if html is going to be build.
Please could you tell me what
Hi,
Sorry about my last question. I've found the solution in the
documentation, and yes; there is a flag in ./configure I did not see.
Thanks
Javier
---
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
Hi Duncan,
I must be misunderstanding something. It is not that I want them built at
installation time, but when I try to display the html help for any
function the html page is not built; e.g. cliking on the link to get() in
the base library, the message appears:
An error occurred while loading
Hi all,
I have a .First - function() {...} in the Rprofile.site file. Through
.First() I'm adding several menus to the GUI to access several functions
I've been developing for own use.
However, I also need to launch R scripts silently in a batch way, and
in this case I get the error message:
Hi all,
I'm having problems trying to export binary arrays from R and importing
them into fortran (linux openSUSE 10.3 (x86_64), gfortran compiler,
fortran 90/95 program).
Let's say the problem can be expressed as:
R part
whini - runif(1000)
writeBin(whini,fwhini.dat)
f90 part
and Duncan,
Javier
---
jgarcia-2 wrote:
f90 part
PROGRAM foo
INTEGER, PARAMETER :: DP = KIND(1.0D0)
INTEGER :: status
REAL(DP), DIMENSION(10,100) :: whini
OPEN(UNIT=5, FILE='fwhini.dat', STATUS='OLD', ACTION='READ',
FORM='UNFORMATTED', IOSTAT=status)
READ(5) whini
CLOSE
Hi all,
I'm testing the use of the hdf5 R library under Windows XP.
With some simple example (an R list with several subobjects as showed in
the examples in the library) the library exports and imports .hdf files
adequately. However, if I try to open the exported file with another
program
Hello,
I' using the pdf() device with bg=transparent to create plots to be used
within a latex (beamer) presentation.
Later on, I see that the background of my pdf() graphics is solid white in
the final presentation.
I'm using R-2.6.0, and I have also tried to set the version argument in
pdf()
Hi,
I've found that after the call to pdf(), I had a posterior line:
par(bg=white)
that was creating this white background. Setting this to transparent works
fine.
Thanks,
Javier
...
Hello,
I' using the pdf() device with bg=transparent to create plots to be used
within a latex (beamer)
Hello all;
Let's say we have a block of 3D data belonging to cubic cells,
and increasing indexes are ordered
x: from west to east
y: from north to south
z: from top to bottom
---
nx - 25
ny - 12
nz - 4
my.array - array(NA,dim=c(nx,ny,nz))
for(z in 1:nz){
my.array[,,z] - runif(nx*ny,z-1,z)
Hi,
Consider also that you may easily modify system names from inside your R
script as:
system(mv oldname newname)
Best Regards,
Javier
...
thoeb wrote:
Hello,
does anybody know about how to send a command or a text line from R to
another program? I have written a script in which several
source() and the use of functions
...
Javier
---
I am working on a program totally written in R which is now getting bigger
and bigger so that editling the only file that contains all the functions
is becoming more and more unmanageable.
I wonder whether it is possible to spread the R code,
It is relatively easy to do a small function for this in R:
a) select the desired width for your border
b) through a fix number or through the use of pretty(), establish the
number of rectangles you want along your border.
Then e.g., you can use rect() you build the sequence of black-white
Hello,
I have a program that used to run well in October, it uses library snow.
Since then, one change has ocurred (snow library has been updated) and
another could have ocurred (I've unadvertently modified something).
Anyway, now when I make the call:
parallel.model.results -
Perhaps you should consider also the possibility of simply export the
data from the R workspace to the system and make your fortran code to read
these system files.
On Thu, 2009-03-26 at 11:01 +0100, mau...@alice.it wrote:
I do hope the chapte about Interfacing R and Fortran is sufficient.
I
Hello;
It seems to me that this could even by a FAQ, but I cannot find an answer:
Why a piece of code that uses sink() does not sinks anything if it is
executed within a for loop?
Thanks,
Javier
__
R-help@r-project.org mailing list
Well, I'll put a foo example of my problem:
I'got a list:
a - list()
a$sublist.1 - list()
a$sublist.1$subsublist.1 - list()
this code works:
zz - file(foo.txt,w)
sink(zz)
a
sink()
close(zz)
and generates a correct foo.txt file containing the structure of the list
but this code doesn't:
Uwe;
sorry for my last mail. In effect, as you say ,I just needed to explicitly
print() the object to be sinked within the loops.
Thanks you,
Javier
[EMAIL PROTECTED] wrote:
Hello;
It seems to me that this could even by a FAQ, but I cannot find an
answer:
Why a
Hello all;
I'm trying to execute parallel jobs trough library snow on a cluster built
through torque/PSB. I'm succesfully obtaining the cluster with:
system(cat $PBS_NODEFILE cluster.txt)
mycluster - scan(file=cluster.txt,what=character)
cl - makeSOCKcluster(mycluster)
The only problem, at the
Thanks you! I'll look at this new list!
Well, I'm not the system administrator, and my installation of Rmpi and/or
pvm libraries for R crashes. As this is the first time I parallelize some
jobs, snow appealed as a first approach because 1) it compiled correctly
and 2) the use of the library is
It seems to me that you are asking for:
hhh - 0.1
sum(dbinom(x=0:50,size=500,prob=hhh))
[1] 0.5375688
You can use 'sample' and 'rle':
x - sample(c(H,T), 500, replace=TRUE, prob=c(.95, .05))
as.data.frame(unclass(rle(x)))
lengths values
1 12 H
21 T
3
Hello;
I'll put my real problem through a simple example:
I've got a main list:
main.lst - lst()
With a number of sublists:
for(i in 1:1000){
main.lst[[i]] - list()
main.lst[[i]]$first - runif(1,0,1)
main.lst[[i]]$second - runif(2,3,4)
}
If later on I need to split this list, how
Hi all;
I've programmed a couple of C libraries which are loaded dynamically into
R (Linux). With one of these, I'm conducting Monte Carlo analysis, but
every individual execution of my model is about 15'. So, I'm running 1000
executions in about 11 days.
This is not enough for my needings, as I
Patrick, you have misundertood me, I mean that Dan's solution (which is
also your solution) are both:
a) more clear and elegant
b) more time efficient. I've checked it with my working 1*3000 element
matrixes. The improvement in speed with your solution is evident.
I do not advise at all to
Hi;
If we have a matrix A, and a vector X, where length(X)=nrow(A), and X
contains a wanted column for each row in A, in row ascending order. How
would be the most effective way to extract the desired vector V (with
length(V)=nrow(A))?
Wishes,
Javier
It seems that this solution provided by Dan (and also available in
SPoetry; I'm sorry I didn't notice it) is the fastest and simplest. I was
using a more standard approach:
V - t(A)[(0:(nrow(A)-1))*ncol(A)+X],
That wasn't bad, but I was confident that you, R gurus, could outperform
this. This is
Hi; I'm trying to install R in a computer in which I have only non-root
access, and I've got readline in a local own directory.
I cannot find my way to compile with readline. I've tried:
[sun2]/global/jgarcia/SRC/R/R-2.7.1: ./configure
--prefix=/global/jgarcia/BIN/R
--with-readline-includes
non-root
access, and I've got readline in a local own directory.
I cannot find my way to compile with readline. I've tried:
[sun2]/global/jgarcia/SRC/R/R-2.7.1: ./configure
--prefix=/global/jgarcia/BIN/R
--with-readline-includes=/global/jgarcia/BIN/readline/include
--with-readline-libs
rev(1:10)
[1] 10 9 8 7 6 5 4 3 2 1
Javier
Dear R-users,
I'd like to turn a vector so it starts with it's end. For better
understanding, this set of commands will do what I need:
i - seq(1:10)
i_turned - i
for (j in 1:length(i)) i_turned[j] - i[length(i)-j+1]
now,
Hi;
It seems to me that has probably been asked in the past. But I cannot find
the track.
I usually need to extract elements from a list and contruct vector from
them; e.g., to create a table. Perhaps there is a way to directly extract
them without looping?
Simple example:
S.lst
$sublist.1
Perfect!!
Thanks a lot!
Javier
---
[EMAIL PROTECTED] wrote:
Hi;
It seems to me that has probably been asked in the past. But I cannot
find
the track.
I usually need to extract elements from a list and contruct vector from
them; e.g., to create a table. Perhaps there is a way to
AgustÃn;
also you can do:
v - c(1,1,1,2,3,4,1,10,3)
dict - cbind(c(1,2,3),c(1001,1002,1003))
v - ifelse(!is.na(match(v,dict)),dict[match(v,dict),2],v)
v
[1] 1001 1001 1001 1002 10034 1001 10 1003
Javier
-
Dear Agustin,
Perhaps
v1 - c(1,1,1,2,3,4,1,10,3)
This should be theoretically very simple, but I dont get the elegant
answer (without looping).
I've got a long (thousands of rows) data frame:
E.coor[1:10,]
east north dat
1 582650 4248850 0.8316848
2 582750 4248850 0.7230272
3 582850 4248850 0.3250818
4 582950 4248850
Thanks for your answers.
I'm sorry. I'm afraid I didn't pose correctly the question , and the use
os subset was misleading. What I need is to obtain the index of the
corresponding rows in E.coor, to subtitute the corresponding values by new
updated values.
The closest answer to what I really need
Hi,
well; this is not a R-specific question. But perhaps you can help.
If I've got an irregularly sampled time series, and conduct a moving
average filter (e.g., with a triangular kernel), how could the uncertainty
bounds be calculated?
Thanks and best regards
J.
---
Hi,
I'm trying to produce a plot of an image of a Matrix, but I don't get
other colors than the default grey scale:
image(Matrix(topo.matrix.2),col.regions=topo.colors(100),colorkey=FALSE)
this still is plotted in grey.
Is there any mistake in my syntax?
Thanks and regards,
Javier
--
Hi;
I cannot find in the R html documentation a way to evaluate
cross-correlation in 2D data sets.
I would like to evaluate cross-correlation in a series of moving windows
between two maps.
i,e, specify several windows inside the complete 2D spatial matrixes and
for each one ofthese windows
There is another solution, which depending on the resolution and amount of
your data may be useful. You can find through interpolation the corners of
four coordinates around any data point that define a four sides polygon.
This grid so created does not need to be regular. Then, you can simple
call
Hi,
I'm no expert programmer at all;
I'm running an R script (mariam1_2.R). This scripts calls another
script, which contains an R function, which .Call some C code.
It runs several times without any problem, but sometimes I get the error:
---
*** caught segfault ***
address 0x1c404ec8, cause
Dear Ramon,
I'm afraid I'm the author of the C function. Although I'm not a 'real'
programmer I need to do some programming in my research work.
As you say, I've used MAKEFLAGS=CFLAGS=-O1, and valgrind, with the
expression you've said.
The content of the log file contains three blocks of the
Hello;
I've used stop() previously without any problem.
Now, I'm using a condition and getting an error when stop() is called.
Mi condition is:
if(dim(r.temp)[1] != (length(jul.names)+6)) stop(buffered data not
available)
An the R' response is:
source(my_program.R)
Error in
Hello;
Please coud you advise me of a simple way to select points (x,y
coordinates) that fall within a polygon.
I've got a set of polygons, each one defined by an arbitrary number of
points, and several points inside each polygon.
I know this is simple with a GIS, but I'd rather do it inside R.
Hi everyone,
I've got a set of thousands points (2D) located on a pixel image, and I
know that four points in this pixels image correspond to four points in a
real space on which I need to locate the mapping of all the thousand
source points from the pixel set.
For this I've got four reference
Hi;
I have a R script that includes a call to genoud(); genoud process lasts
about 4 seconds, what would be OK if I hadn't have to call it about 2000
times. This yields about 2 hours of processing.
And I would like to use this script operationally; so that it should be
run twice a day. It seems to
45 matches
Mail list logo