Displaying 20 results from an estimated 400 matches similar to: "dyn.load"
2004 Jun 10
2
Questions about Preserving registers
Hi folks,
I tried to use Mirosoft Fortran Powerstation 4.0 to create a dll file.
However, when I used the command dyn.load(“test.dll”), I got the
following message:
NULL
Warning message:
DLL attempted to change FPU control word from 9001f to 90003
I read the instruction on Duncan Murdoch’s website about preserving
registers, but I still don’t understand it. For example,
1. On first entry
2006 Nov 17
2
Data table in C
After getting one list done, I am now struggling to form a data frame in C.
I tried to do a list of lists which gives me :
$<NA>
$<NA>[[1]]
[1] "BID"
$<NA>[[2]]
[1] 0.6718
$<NA>[[3]]
[1] 3e+06
$<NA>
$<NA>[[1]]
[1] "BID"
$<NA>[[2]]
[1] 0.6717
$<NA>[[3]]
[1] 5e+06
$<NA>
$<NA>[[1]]
[1] "BID"
2006 Nov 09
2
Retrieving function name
Hi,
Does anyone know how I can retrieve a function name, for example
If I have a function f as follows:
f <- function( myfunc ) {
print( name_of(myfunc) );
}
I want to know what I should have as "name_of" such that I could call this
with :
f( median )
and it would print "median"
or f( my_function_name ) and it would print "m_function_name".
So far all I
2006 Nov 14
2
String to list and visa versa
Hi,
I need to collapse a list into a string and then reparse it back into the
list. Normally when I need to do this I simply use write.csv and
read.csv, but I need to do this in memory within R rather than writing out
to file. Are there any bespoke commands that any knows of that does
something like this or any tips for doing this that anyone can suggest? I
basically don't care
2006 Nov 22
1
Ralloc clash
Hi everyone,
Have been trying to include windows.h (from MinGW) and R.h into a package
and have found that Ralloc is coming up as a clash no matter which include
ordering I use. In windows it has 2 arguments and is defined in objidl.h
and in R.h it is 3 arguments. Any ideas of how to work round this? Have
checked the web and have not seen anyone else comment on this.
Many thanks
Tom
2006 Nov 07
1
variable problem
Hi everyone,
I am not sure this is possible so I would be interested in your
responses. Say I have a variable 'v' with the string "myargument" in and
I have a function 'f' that takes this argument as follows;
f <- function( myargument=5 ) {
... does something...
}
Is there anyway I can say something like;
f( v=10 ) such that it will be evaluated as f(
2007 Jan 30
4
Speed of for loops
Hi Everyone,
I have a question about for loops. If you have something like:
f <- function(x) {
y <- rep(NA,10);
for( i in 1:10 ) {
if ( i > 3 ) {
if ( is.na(y[i-3]) == FALSE ) {
# some calculation F which depends on one or more of the previously
generated values in the series
y[i] = y[i-1]+x[i];
} else {
y[i] <- x[i];
}
}
}
y
}
e.g.
>
2007 Jan 30
4
Speed of for loops
Hi Everyone,
I have a question about for loops. If you have something like:
f <- function(x) {
y <- rep(NA,10);
for( i in 1:10 ) {
if ( i > 3 ) {
if ( is.na(y[i-3]) == FALSE ) {
# some calculation F which depends on one or more of the previously
generated values in the series
y[i] = y[i-1]+x[i];
} else {
y[i] <- x[i];
}
}
}
y
}
e.g.
>
2006 Nov 17
1
Manipulating R lists in C
Hi,
I have been studying the R manual on lists but cannot seem to create a
simple R list in C - I keep on getting "'dimnames' applied to non-array"
whenever I attempt to assign names to the list elements:
Wanted output a list structure something like
[ type="Bid", price=2.0, volume=1000 ]
I can get up to a list of
[ "Bid2, 2.0, 1000 ]
But for the life of
2006 Dec 09
2
Floating point maths in R
Hi,
I am not sure if this is just me using R (R-2.3.1 and R-2.4.0) in the
wrong way or if there is a more serious bug. I was having problems
getting some calculations to add up so I ran the following tests:
> (2.34567 - 2.00000) == 0.34567 <------- should be true
[1] FALSE
> (2.23-2.00) == 0.23 <------- should be true
[1] FALSE
> 4-2==2
[1] TRUE
> (4-2)==2
[1] TRUE
>
2007 Jan 26
0
Cross-network printing
Hi,
For a machine connected over the internet to pass through a firewall and
print using samba what ports do I need open? I am using CUPS and SAMBA so
do I need to open up the ports to connect to CUPS as well as SAMBA?
Basically is the situation when printing with samba at the point of
connection to the printer a or b below?
(a) remote machine --> print job --> firewall -->
2007 Jan 23
1
Port Problem
Hi Everyone,
Hope I have sent this to the correct list. I have been struggling away
with a weird problem all evening and have not had any joy on google so
thought I would try here.
The problem in a nutshell is as follows:
(Internal Network) Windows XP (Client) ---> Fedora Core4 (Samba
Server) Both shared areas and printers work from windows client.
(External Network) Windows XP
2003 Jan 22
4
Read.table for macs
Dear All,
I've been using R for windows for a while, without too many problems.
However, I'm forced to use the MAC OS system for teaching, because our
teaching labs are mac only (not my idea!!). I have a very basic problem,
but one that doesn't appear on the FAQs. I simply want to import data
from a spreadsheet. I'm using exactly what works fine on Windows, namely:
1 save
2006 Jan 18
3
Partial Problems
Hey guys,
I''m having a little trouble working out partials.
I have successfully made a partial work in my list.rhtml, but as I see it on
the 15min introductry video. They guy uses one partial on multipul pages.
At the moment I am trying this in my show.rhtml, I write <%= render :partial
=> "journal" %> and I get this.
NoMethodError in Write#show
>
> Showing
2006 Oct 27
1
Overloading functions
Hi Everyone
I have a function f which does something using a function g. Function f
is in a library and g has a default stub in the library but will be mainly
overloaded in a later R script. For example:
########## In a compiled package 'P' #################
g <- function() {
cat("Original function g");
}
f <- function( newGsource=NULL ) {
if(
2006 Jan 16
1
ajax search
Hi everyone,
I''m a bit new to rails, but I have played around with it for the last month.
I really enjoy programming in rails and I feel that I should program my new
application through this framework.
I am very exited when I start creating my scaffolds and views, there is some
sense of accomplishment.
Now I would really like to make a search function my page that would search
through
2012 May 30
2
Simple example for High performance computing with R?
Dear list,
I want to run two independent calculation (A, B) and then combined
their results to do a plot in R. Before I just run calculation A
first, then calculation B. It will take some times. I just have one
server with multiple core. I noticed that there are some nice package
in R for parallel calculation, such as parallel, multicore and snow.
Also there is a book, O?Reilly ? ?Parallel R,
2007 Feb 20
2
Problem with types on 64-bit
Hi Everyone,
I have a problem using some working 32-bit R code with 64-bit machine ( I am
using version R-2.4.1 ). The problem occurs when I am trying to detect a NULL
STRSXP type. ( Perhaps I am doing this detection in the wrong way? )
On 32-bit the following works, and correctly identifies if I am passing NULL
or a valid string object:
if ( v_dta_start != R_NilValue && STRING_ELT(
2000 Apr 26
2
Cross compiling a package for Windows on Linux
I would like to compile for Windows a rather simple R package that
contains some C code. It does not contain any Fortran code.
I tried the cross-compilation route using the pre-built set of tools
from http://www.devolution.com/~slouken/SDL/Xmingw32/, as described in
$R_SRC/src/gnuwin32/INSTALL
Using the sources in r-devel from the rsync site I am able to build
libR.a in src/gnuwin32 but I
2006 Sep 12
2
Memory problems with a custom R package
Hi everyone,
I have been attempting to build a very simple R package interfacing with
some very simple C++ code. Everything I try though results in the
function working but on return it produces a memory error. Here is the
output:
***********OUTPUT***************************
> library(MyPackage)
> hello();
*** caught segfault ***
address 0x3, cause 'memory not mapped'