Displaying 20 results from an estimated 600 matches similar to: "calling R from PHP and saving outputs"
2008 Mar 08
1
Installing odesolve package of R under Ubuntu (Debian) Linux
Bonjour,
Je cherche à installer le package odesolve du logiciel de statistique R sous
Ubuntu Linux.
C'est un package qui contient des fonctions appelant du code en Fortran.
A l'installation sous R via le shell, j'obtiens l'erreur suivante:
Hi,
I tried to install odesolve package of R under Ubuntu Linux.
But I got the following error:
ghislain@ghislain-laptop:~$ sudo R
[sudo]
2001 Jul 30
0
Remote controlling R via sockets
Many thanks to the R core team for their work on R connections. I was delighted to discover that it is now possible to remote-control R-1.3.0 via a socket connection - something which Brian Ripley noted was not yet possible with R-1.2.0 back in January 2001 in the first R News newsletter. How? Just substitute source() for readLines() in last few lines of the example for a socket connection given
2015 Mar 03
0
Feature request: copy attributes in gzcon
The `gzcon` function both modifies and copies a connection object:
# compressed text
con1 <- url("http://www.stats.ox.ac.uk/pub/datasets/csb/ch12.dat.gz")
con2 <- gzcon(con1)
# almost indistinguishable
con1==con2
identical(summary(con2), summary(con1))
# both support gzip
readLines(con1, n = 3)
readLines(con2, n = 3)
# opening one opens both
isOpen(con2)
2007 Dec 08
1
FW: R memory management
Hi,
I'm using R to collect data for a number of exchanges through a socket
connection and constantly running into memory problems even though task I
believe is not that memory consuming. I guess there is a miscommunication
between R and WinXP about freeing up memory.
So this is the code:
for (x in 1:length(exchanges.to.get)) {
tickers<-sqlQuery(channel,paste("SELECT Symbol
2012 Aug 08
2
Exec resource don't write file after the command
Hi all,
I''m trying to have the exec resource write a file after the command but it
don''t.
here is the resource declaration
class gepet {
notify { ''begin'':}
file { ''/root/essai/html'':
ensure => present,
content => "Wrote By Yves Nton",
notify => Exec[''test''],
}
exec { ''test'':
path
2020 Oct 08
0
Lahman Baseball Data Using R DBI Package
Hi Philip,
You've probably realized by now that R doesn't like column names that
start with a number. If you try to access an R-dataframe column named
2B or 3B with the familiar "$" notation, you'll get an error:
> library(DBI)
> library(RSQLite)
> con2 <- dbConnect(SQLite(), "~/R_Dir/lahmansbaseballdb.sqlite")
> Hack12Batting <-
2012 Nov 16
2
How to create as.numeric.xxx
I would like to create a function to convert data based on a class using
as.numeric
Similarly, using a plot, I do:
plot.essai <- function(x, ...) {return(x*2)}
d <- 10
class(d) <- "essai"
plot(d)
It works:
[1] 20
attr(,"class")
[1] "essai"
Now same with as.numeric:
as.numeric.essai <- function(x, ...) {return(x*2)}
as.numeric(d)
It does not work:
2007 Jul 17
4
[R-sig-DB] RODBC on Oracle DB
essai <- odbcConnect("ORESTE_prod", uid="osis_r", pwd="12miss15" ,case="oracle")
> sqlTables(essai)$ORESTE
...
1315 <NA> ORESTE S_PROFESSIONS_OLD TABLE <NA>
1316 <NA> ORESTE S_PROVENANCES TABLE <NA>
1317 <NA> ORESTE
2002 Jan 26
1
Trouble with contrasts
Greetings,
I have a nagging problem with contrasts and I can't seem to resolve it.
A factor exists with four levels (lib1, lib2, con1, con2) and when I
check the contrasts or set the contrasts to any of the prespecified
ones, I do not get the exact contrasts necessary to test the
theoretically relevant ones. I need orthogonal contrasts that look just
like this matrix:
con1 con2
2020 Jun 29
0
A warning in gzcon but not in gzfile
Hi all,
I used `gzfile` and `gzcon` to read a compressed file but I found that
`gzcon` gave me a different result than `gzfile`. It seems like the `gzcon`
does not handle the data correctly. I have posted an example below. In the
example, a portion of a compressed file is downloaded from Google Cloud as
a raw vector, and the data is saved into a temp file. If I use ` gzfile` to
read the file, it
2020 Oct 08
1
Lahman Baseball Data Using R DBI Package
This is really a feature of SQL, not R. SQL requires that you double quote
column names that start with numbers, include spaces, etc., or that are SQL
key words. E.g.,
> d <- data.frame(Order=c("sit","stay","heel"),
Where=c("here","there","there"), From=c("me","me","you"))
>
2016 Sep 07
2
ACL wrong category user for group and group for user
Hello Rowland!
The users and group are only on the AD, and there are only one entry on
each user...
In the Windows side all seems ok :
but not the result of getfacl ...
root at Samba4:/Fichiers# getfacl /Fichiers/SA/Nouveau\ document\ texte.txt
getfacl : suppression du premier « / » des noms de chemins absolus
# file: Fichiers/SA/Nouveau document texte.txt
# owner: ciril
# group:
2011 Dec 02
2
Problem with loop
Hi,
I try to build a loop difficultly.
I have in a folder called Matrices several files (.csv) called Mat2002273,
Mat2002274 to Mat2002361.
I want to calculate for each file the mean of the column called Pixelvalues.
I try this code but as result, I have this message: Mat2002273 not found
2007 Dec 18
2
R brakes when submitting a query to MySQL
Hello,
I would like to retrieve data stored in MySQL database, so I installed
RMySQL package.
I can successfully connect with the my database using the following code
> dvr<-dbDriver("MySQL")
> con2<-dbConnect(dvr,group="exbardiv")
> mysqlDescribeConnection(con2)
<MySQLConnection:(972,0)>
User: mmorag
Host: localhost
Dbname: exbardiv
2007 Dec 31
1
Program output to file using a batch command file
If I copy the following commands in my batch file to the R console, R
creates a file named "basicStatsIBM.lis" with the program output in it:
Sortie <- file(description = "basicStatsIBM.lis", open = "wt", blocking =
TRUE,
encoding = "UTF-8")
sink(file = Sortie, append = FALSE, type = "output", split = FALSE)
basicStats(ibm)
close(Sortie)
2003 May 19
3
how to run R as a daemon
Hi all,
Using R a as a real-time application called by Php for a website, I
would like to run one R process only, which would manage user
connections. For the time each user who asks for an analysis causes a
new R process to start, which is not suitable in prevision of many
users. R needs about 30 seconds to run the script which makes the
analysis. The problem is that this waiting time is n
2016 Oct 30
0
closeAllConnections() can really mess things up
This is what I get on R 3.3.1 on Linux:
> con1 <- textConnection("foo1", open = "w")
> print(con1)
description class mode text
"foo1" "textConnection" "w" "text"
opened can read can write
"opened"
2003 Nov 18
2
readline not found
Hi all,
I just upgraded to R-1.8.0. Everything worked fine but command line
editing does not work. This clearly indicates that readline has not been
found in the compilation process.
How could I explicitely indicate where to find it ?
I use a Red Hat 8.0 system. I checked the FAQ which says readline-devel
is also needed, but I have it already installed. Perhaps should I add
the configure
2006 Nov 17
2
Forming SQL Query at run-time
Hi.
I am trying to get data from mysql database using a couple of queries.
I do one query to find out the indexes. Then i need to use these
indexes in another query, but i keep getting errors.
Here is something:
numb <- dbSendQuery(con2, "select distinct(comparison) from table1")
count <- fetch(numb, -1)
my.matrix <- as.matrix(count)
rs <- dbSendQuery(con2, "select
2004 Mar 31
3
scan seems to modify the data
Hello list,
I have used scan function to import data into R. I have done some analysis
and find strange results. I have found my problem : when importing data
with scan, this can slightly modify the data :
> write(c(0.251,3.399,-0.481,0.266),"essai.txt")
> scan("essai.txt")
Read 4 items
[1] 0.251 3.399 -0.481 0.266
> print(scan("essai.txt"),17)
Read