Displaying 20 results from an estimated 1000 matches similar to: "Multi-line input to rsympy"
2009 Jul 28
1
Problem runnin rSymPy
Hi all,
I'm having major difficulty using the rSymPy package this week, but I have
used it without problems before now. Here is an example of what's happening:
> library(rSymPy)
Loading required package: rJava
> sympy("var('a b c d')")
Error in .jcheck() : No running detected. Maybe .jinit() would help.
And I have no idea how to fix it. I Have tried re-installing
2012 Apr 14
2
some questions about sympy (that is, rSymPy)
I am experimenting with rSymPy, and it seems to work nice.
However, I dislike the need to wrap all sympy expressions within
quotes, it leads to ugly calls like
library(rSymPy)
Var("x,y,z")
sympy("(x+y)**2")
and so on.
Inspired by the function cq from mvbutiles package:
library(mvbutils)
> cq
function (...)
{
as.character(sapply(as.list(match.call(expand.dots =
2013 Sep 12
1
problem with rJython and modules
Dear R People:
I have been experimenting with rPython, rSymPy, and rJython. Here is my
latest snag:
> library(rJython)
Loading required package: rJava
Loading required package: rjson
> library(rSymPy)
> rJython <- rJython()
> x <- "x"
> y <- "y"
> rJython$exec("from sympy import *")
Error in .jcall("RJavaTools",
2009 Sep 01
5
Including a binary Python Interpreter into a binary R-package for MS Windows
2009/8/30 Uwe Ligges <ligges at statistik.tu-dortmund.de>:
[snip]
> Guido van Steen wrote:
[snip]
>> Something that interests me too: What about R's policy with respect to
>> including binary files? I saw that developers should include a file
[snip]
> Please do not include binary files and carefully watch for licenses of those
> files (e.g. if GPL'ed, you need to
2013 Sep 10
0
question about rSymPy and integration
Dear R Users:
I would like to use symbolic integration from rSymPy and pass in the actual
function.
So I have
> sympy("x=Symbol('x')")
and if I use
> sympy("integrate(cos(x),x)")
it works fine.
But what I want to do is something like
> y <- "cos(x)"
> sympy("integrate(y,x)")
"cos(x)*x"
Has anyone run into this, please?
2009 Apr 22
5
large factorials
I am working on a project that requires me to do very large factorial
evaluations. On R the built in factorial function and the one I created
both are not able to do factorials over 170. The first gives an error and
mine return Inf.
Is there a way to have R do these larger calculations (the calculator in
accessories can do 10000 factorial and Maple can do even larger)
--
View this message in
2010 Apr 26
1
finite difference scheme for 2D differential equations
Hello everyone,
I am trying to solve 2D differential equations using finite difference
scheme in R. I have been able to work with the equations with only one
spatial dimensions but I want to extend it to the two dimensional problem.
For example i can simulate one dimensional diffusion using a code like the
following. But I want to write a similar code for,say, a two dimensional
diffusion
2005 Oct 13
1
problems with loop and plot function
Hi all R users,
I have problems with my second loop for drawing the three curves in the
same graphic. I need help please
Thank you in advance
#########################################################################
simulation <- function(k, n){
conc <- seq(0,100,by=0.5)
#choixg <- seq(1, length(conc))
choixg <- rep(0,length(conc))
for (i in 1:length(conc)){
choixg[i] <- (k
2005 Oct 11
2
Problems with plot function
Hello all R users,
My simulation function works correctly, but I have problems with plot
function. You will find the following code using it.
Thank you for your help
##################################################"
simulation <- function(k, n){
conc <- seq(0,10,by=0.5)
#choixg <- seq(1, length(conc))
choixg <- rep(0,length(conc))
for (i in 1:length(conc)){
choixg[i]
2008 Nov 11
2
strsplit (regex)
#how do I break these up into first two letters (RM), number, and then
the last part
#is there an easily accessible regex tutorial on the internet?
v = (structure(1:122, .Label = c("RM215Temp", "RM215SpCond", "RM215DO.Conc",
"RM215Depth", "RM215pH", "RM215ORP", "RM215Turbidity.", "RM215Battery",
"RM215DO.",
2023 Oct 24
2
How to Calculate the Mean by Multiple Groups in R
Hi,
I think you're misunderstanding which set of variables go on either
side of the formula.
Is this what you're looking for?
> aggregate(OD ~ Time + Target + Conc, data = df, FUN = "mean")
Time Target Conc OD
1 1 BACT 1 765.3333
2 1 BACT 2 745.3333
3 1 BACT 3 675.0000
> aggregate(ODnorm ~ Time + Target + Conc, data = df, FUN =
2012 Aug 07
2
Passing arguments to a function within a function ...
Hallo Everybody
How do you specify arguments for a function used within another function?
Here is my problem:
I am reconstructing a calculator for the burden of disease due to air
pollution from publications and tools published by the WHO. The
calculations make use of published dose-response relationships for
particular health end-points. This is then applied to populations with
known or
2023 Oct 24
1
How to Calculate the Mean by Multiple Groups in R
Also,
> aggregate(cbind(OD, ODnorm) ~ Time + Target + Conc, data = df, FUN = "mean")
Time Target Conc OD ODnorm
1 1 BACT 1 765.3333 108.33333
2 1 BACT 2 745.3333 88.33333
3 1 BACT 3 675.0000 18.00000
(You might wish for "cbind(OD,ODnorm) ~ . - Well", but aggregate.formula is not smart enough for that.)
-pd
> On 24 Oct 2023, at
2005 Sep 14
1
Long lines with Sweave
I have used Sweave a lot the latest year, but never really used any long
function calls.
If I have code which look like this
-------------------------------------------------------------
gof <- benthic.flux(ID="Gulf of Finland",
meas.conc=conc,
bw.conc=bw.conc,
time=times,
2005 Jul 08
2
Distributing custom driver config in TDB files
Hi,
Is there a way to populate customized settings of the drivers (printing
related TDB files) from one Print Server to another?
Here is the background:
I am working on centralized driver distribution. Besides pushing all
the drivers from a central location to the edges, the administrator
should also be allowed to customize the drivers settings and the
distribution should send those
2006 Jul 18
2
Using corStruct in nlme
I am having trouble fitting correlation structures within nlme. I would like to
fit corCAR1, corGaus and corExp correlation structures to my data. I either
get the error "step halving reduced below minimum in pnls step" or
alternatively R crashes.
My dataset is similar to the CO2 example in the nlme package. The one major
difference is that in my case the 'conc' steps are
2005 Apr 19
3
Help with predict.lm
Hi
I have measured the UV absorbance (abs) of 10 solutions of a substance at
known concentrations (conc) and have used a linear model to plot a
calibration graph with confidence limits. I now want to predict the
concentration of solutions with UV absorbance results given in the new.abs
data.frame, however predict.lm only appears to work for new "conc" variables
not new "abs"
2012 Sep 20
3
lattice dotplot reorder contiguous levels
my reproducible example
test<-structure(list(site = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L,
3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,
4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 5L), .Label = c("A",
"B", "C", "D", "E"), class = "factor"),
2006 Jul 31
1
Algebraic operation on the missing values
Hi all,
I have a large set of descriptors, which are stored as the vectors, each one
containing about 450 elements. Now I have to perform some algebraical
operations on this set to eliminate the redundant ones. The problem is, that
not all vales in the vectors are known.
Are there any norm defined how should I process such vectors? Simple example:
having two vectors:
a b
3 4
2
2003 Oct 30
2
'nls' and its arguments
Dear R experts!
I'd to fit data by 'nls' with me-supplied function 'fcn'.
1) I'd like 'fcn' to accept arbitrary arguments, i.e. I defined it
as f(...) {<body>}. (Ok, that's not actually impotant).
2) Second, I would NOT like to supply every parameter in the formula.
To illustrate this, let's look at the last example of 'nls' help