Displaying 20 results from an estimated 3000 matches similar to: "Problem with long number (from character to numeric class)"
2010 Nov 24
2
looking for the RMySQL package for R 2.12.0 under XP
Hello,
I convinced our new Ph student to work with R and I managed to convince the
guy in charge of the computer networks to install R 2.12.0 (we haven't the
admin rights).
I wanted to install on his computer the same packages I use (but I have R
2.11) and especially RMySQL.
Problem : there is no more RMySQL package in the list pf the packages.
I've tried to install my version but it is
2010 Feb 15
3
executable R script under xp (to avoid migration toward Matlab or C++)
Hello,
I discovered R two years ago and thanks to the R-community I managed to
write some scripts to analyze my data stored in mysql databases.
The only problem is that I am the only one using R in the lab. Colleagues
mainly use Matlab (but not with mysql, only with text files) but regularly
come to me to get data treated with R-scripts !!!.
To allow the use of my scripts by other people, my
2012 Jun 13
2
add horizontal reference lines in lattice bwplot
I'm plotting a lattice bwplot from a data.frame and would like to add some horizontal lines indicating some reference values (preferably with text annotation) as well as a grid of regular log tics. The following illustrates the plot:
data(ToothGrowth)
require("lattice")
p = bwplot(exp(len) ~ supp, ToothGrowth,
panel = function(..., box.ratio) {
panel.grid(h=-1,
2010 Nov 19
3
Still confused with lapply
Hello,
I would like to replace a for loop with lapply in order to speed up the
treatment of my data (I've read lapply can help to do it).
At the end of the message, you will find a simple example (function is more
complex and data frames is more than 1 million of rows) of what I would like
to do, that is applying the same calculation to all the rows of the data
frame (knowing that I cannot
2011 Dec 15
2
lm and R-squared (newbie)
Hello,
I've two data.frames (data1 and data4), dec="." and sep=";".
http://r.789695.n4.nabble.com/file/n4199964/data1.txt data1.txt
http://r.789695.n4.nabble.com/file/n4199964/data4.txt data4.txt
When I do
plot(data1$nx,data1$ny, col="red")
points(data4$nx,data4$ny, col="blue")
, results seem very similar (at least to me) but the R-squared of
2012 Jun 28
1
add constraints to nls or use another function
Hello,
I'm trying to fit experimental data with a model and nls.
For some experiments, I have data with x from 0 to 1.2 and the fit is quite
good.
But it can happen that I have data only the [0,0.8] range (see the example
below) and, then, the fit is not correct.
I would like to add a constraint, for example : the second derivative must
be positive.
But I don't know how to add this to
2007 Dec 10
7
Sweave : change value in rnw file to generate multiple "single" reports ?
Hello,
I'm still trying to make the life of my colleagues easier. Nice, isn't it ?
At the moment, I'm looking for a way to generate multiple "single report".
In fact I have a .rnw file which send a query to a MySQL database
(rs<-dbSendQuery(con, statement="select * from treatdata where
name='Device1'")
But of course my colleagues have many devices and
2010 Jun 15
3
Problem with as.POSIXlt$hour
Hello,
In one of my functions, I need to extract the hour from a date.
For example:
as.POSIXlt("2010-03-27 02:00:00")$hour gives 2 as expected.
It works for all the dates I've tested except the following one which is in
my list of dates:
as.POSIXlt("2010-03-28 02:00:00")$hour which gives 0.
I don't understand why it doesn't work with this particular date.
Any
2007 Sep 17
4
Must be easy, but haven't found the function (numerical integration)
Hi,
I have a data frame of 2 columns with the following types :
data$day char
data$value num
And I plot my data with :
plot(strptime(donnees$day,format="%Y-%m-%d %H:%M:%S"),donnees$value,
type="l")
And I'd just like to get the numerical value of the integration of this
graph.
I looked at ?integrate but, as far as I understood (that is, not very much,
due to my poor
2011 Sep 23
2
Homography with R
Hello,
I would like to know if it exists a package including something equivalent
to this page:
http://www.developpez.net/forums/d740403/autres-langages/algorithmes/contribuez/image-geometrie-projective-homography/
http://www.developpez.net/forums/d740403/autres-langages/algorithmes/contribuez/image-geometrie-projective-homography/
I've searched with these keywords: R-project homography
2009 Jun 05
2
find a sequence of characters in a vector
Hello,
I'm just looking for an easy way to find the positions of a complete
sequence in a bigger vector.
For example :
c("a","z","e") in c("a","z","e","r","t","a","z","a","z","e","c")
and the result should be
1 8
that is the positions of the beginning of
2007 Nov 20
2
Friendly way to link R - MySQL and non-(R and Mysql) users ?
Thanks to your help, I managed to link R and a Mysql Database, send queries,
plot the results and put everything in a pdf document (with Sweave).
My co-workers find the job not bad but they would like to have a friendly
interface to send queries and see the graphs (the pdf document is not
necessary).
Something like this coul be a good starting point :
---------------------------------------
|
2007 Dec 17
2
Must be obvious but not to me : problem with regular expression
Hi,
I have a vector called nfichiers of 138 names of file whose extension is .P0
or P1 ... to P8.
The script is not the same when the extension is P0 or P(1 to 8).
Examples of file names :
[128] "Output0.P0"
[129] "Output0.P1"
[130] "Output0.P2"
[131] "Output01102007.P0"
[132] "Output01102007.P1"
[133]
2008 Aug 01
1
Best way to select good points in a noisy signal ?
Hello,
When I plot y=f(x) from the file xy.txt (
http://www.nabble.com/file/p18773387/xy.txt xy.txt ), I can clearly see a
trend.
Is there a function or a package able to take the median value of y for an
interval of x (x +/- a defined value) to plot nice graph (at least a better
one) ?
Thanks in advance,
Have a nice week-end,
Ptit Bleu.
--
View this message in context:
2010 Mar 12
2
looking for a package to solve current-voltage equation I=f(I)
Hello,
I'm looking for a R-package to solve such an equation :
http://n4.nabble.com/file/n1590462/iv.png
which is one current-voltage equation of a solar cell.
Thanks in advance,
Ptit Bleu.
--
View this message in context: http://n4.nabble.com/looking-for-a-package-to-solve-current-voltage-equation-I-f-I-tp1590462p1590462.html
Sent from the R help mailing list archive at Nabble.com.
2010 Nov 30
2
xyplot : superimposed 2 groups in different panels
Hello,
I would like to plot the following xyplot : for each date of fff (1 date per
panel), bbb=f(aaa) for the two groups (ddd=1 and ddd=2) superimposed.
I can do it by group (see below) but not together.
I looked at http://lmdvr.r-forge.r-project.org/figures/figures.html but I
haven't found what I was looking for (to be honest, I haven't understood all
the examples).
Any help will be
2007 Aug 31
2
Problem of vocabulary : retrieve element of a list of a list
Hi,
I read the posts for 2 hours and ?list and tried many comninations but I
haven't found the answer to this basic question. So I decided to post my
question even if it is a silly one ...
What is the instruction to retrieve, for example, the "D" of the first list
?
Thanks in advance,
Ptit Bleu.
> x<-list(LETTERS[1:5], LETTERS[10:20])
> x
[[1]]
[1] "A"
2007 Nov 07
3
Can I replace NA by 0 (if yes, how) ?
Hello,
I'm trying to fit some points with a 8-degrees polynom (result of lm is
stored in pfit).
In most of the case, it is ok but for some others, some coefficients are
"NA".
I don't really understand the meaning of these "NA".
And the problem is that I can't perform a derivation
(pderiv<-as.function((deriv(polynomial(pfit$coefficients))))) on pfit due to
the
2008 Jul 17
1
Newbie's question about lm
Hello,
I would like to fit data with the following formula :
y=V*(1+alpha*(x-25))
where y and x are my data, V is a constant and alpha is the slope I'm
looking for.
How to translate this into R-language ?
At the moment, I only know : lm(y ~ x)
Sorry for such a basic question. I thought I could find the solution in a
post but I have to confess that, up to know, I'm not able to understand
2007 Nov 06
1
How to find the zero (only the real solution) with the package polynom ?
Hello,
I have 3 columns : a, b and a*b
I would like to find the pair (a,b) so that a*b is the minimum but not from
the points I measured but from the fit of the curve (I have more points that
the ones given below but I fit only on this part because I
know that the minimum a*b is in this interval).
I thought doing it this way :
- to fit a*b=f(a)
abfit<-lm(ab ~ poly(a,8,raw=T))
- to use the