I just now registered in R forum.
I use Windows because of past history of using windows.
I have been writing and using programs in java for about a decade.
I work with unequal-interval-time-series data files, 1st 5 lines like:
Title Line
I am importing CSV data with thousands of rows, if any row contains an error
from excel, the whole program crashes, so i need to delete all rows with the
value of #VALUE!, all other values are non-numeric...
I've tried a bunch of strategies, but nothing seems to work.
Thanks ahead of time guys,
On Apr 22, 2011, at 10:35 PM, empyrean wrote:
I am importing CSV data with thousands of rows, if any row contains
an error
from excel, the whole program crashes, so i need to delete all rows
with the
value of #VALUE!, all other values are non-numeric...
I've tried a bunch of strategies,
On Apr 23, 2011, at 2:49 AM, David Winsemius wrote:
On Apr 22, 2011, at 10:35 PM, empyrean wrote:
I am importing CSV data with thousands of rows, if any row contains
an error
from excel, the whole program crashes, so i need to delete all rows
with the
value of #VALUE!, all other values
Hi,
Does anyone know if the function procGPA in library shapes works for
aligning one dimensional curve?
For example my input to this function is:
procGPA(data, tangentresiduals = FALSE), where data is a 14 x 1 x 10 array.
But I don't get any result and the error is:
Error in procGPA(data,
Dear R,
I'm doing some simulation work and it takes me a lot of time to do it
in R. So I try to implement it in C code, but I want to use some R
functions directly for my lazy and the robustness of code. For
example, I will use lm and nlm in my program. How could I use R's lm
and nlm function
Wrong mailing list!!
This got posted accidentally to R-packages -- which is
exclusively for (semi-)important announcements by package *authors*.
Please do only reply to R-help --- and do use R-help for *ALL*
questions about R packages (unless you ask the package
maintainer directly ..).
Martin
On Sat, Apr 23, 2011 at 6:25 AM, Shuguang Sun shugu...@gmail.com wrote:
Dear R,
I'm doing some simulation work and it takes me a lot of time to do it
in R. So I try to implement it in C code, but I want to use some R
functions directly for my lazy and the robustness of code. For
example, I
I KNEW there was a better way!
--- On Wed, 4/20/11, Jeremy Hetzel jthet...@gmail.com wrote:
From: Jeremy Hetzel jthet...@gmail.com
Subject: Re: [R] Random Relabelling
To: r-help-arch...@googlegroups.com
Cc: r-help@r-project.org, Kevin Matthews kevin-matth...@uiowa.edu
Received: Wednesday,
No answer to my post,
so let's try a simpler question. Am I doing this correctly?
I have the RGui with R Console on the screen.
On rhe top pullDowns, Packages Install Packages USA(IA) rJava
library(rJava)
.jinit()
qsLin - .jnew(C:/ad/j/CalqsLin)
Error in .jnew(C:/ad/j/CalqsLin) :
Date: Fri, 22 Apr 2011 10:00:31 -0400
From: littleduc...@gmail.com
To: r-help@r-project.org
Subject: [R] Survival analysis: same subject with multiple treatments and
experience multiple events
Hi there,
I need some help to figure out what
Hi all,
I am trying to write a loop to return the matched index for a column
of values. Here is an simple example of this,
A B
0 5
1 2
2 2
3 4
4 1
5 4
6 2
In this case, A is an index column for B. Now I have this new column C
with just two values of 2 and 4. I want to
On Sat, Apr 23, 2011 at 8:32 AM, hill0093 hill0...@umn.edu wrote:
No answer to my post,
so let's try a simpler question. Am I doing this correctly?
I have the RGui with R Console on the screen.
On rhe top pullDowns, Packages Install Packages USA(IA) rJava
library(rJava)
.jinit()
qsLin -
That's more than I can understand.
I just need help from someone who knows.
Should be a simple answer from that person.
--
View this message in context:
http://r.789695.n4.nabble.com/Using-Java-methods-in-R-tp3469299p3469882.html
Sent from the R help mailing list archive at Nabble.com.
On 2011-04-23 03:42, John Kane wrote:
I KNEW there was a better way!
--- On Wed, 4/20/11, Jeremy Hetzeljthet...@gmail.com wrote:
From: Jeremy Hetzeljthet...@gmail.com
Subject: Re: [R] Random Relabelling
To: r-help-arch...@googlegroups.com
Cc: r-help@r-project.org, Kevin
Hi,
I'd like to change the default orientation of bwplot() and stripplot()
so the plots are displayed vertically. Passing horizontal=FALSE into
stripplot in the simple code below doesn't seem to be the answer.
library(lattice);
x - rnorm(100);
y - as.factor(sapply(1:100, function(k)
On Apr 23, 2011, at 6:31 AM, xu...@pdx.edu wrote:
Hi all,
I am trying to write a loop to return the matched index for a column
of values. Here is an simple example of this,
A B
0 5
1 2
2 2
3 4
4 1
5 4
6 2
In this case, A is an index column for B. Now I have this new
On 23 April 2011 at 18:25, Shuguang Sun wrote:
| I'm doing some simulation work and it takes me a lot of time to do it
| in R. So I try to implement it in C code, but I want to use some R
| functions directly for my lazy and the robustness of code. For
| example, I will use lm and nlm in my
I have a table.
First column is a date, second column is an index and other columns contains
some other values.
I want to remove, for each date, the row with the smallest index (it is not
necessarily 1).
ex: in the following table, I want to remove row 1 (2013-05-12 with index 2)
and row 8
On Apr 23, 2011, at 9:26 AM, David Neu wrote:
Hi,
I'd like to change the default orientation of bwplot() and stripplot()
so the plots are displayed vertically. Passing horizontal=FALSE into
stripplot in the simple code below doesn't seem to be the answer.
library(lattice);
x - rnorm(100);
y
On Apr 23, 2011, at 9:05 AM, - - wrote:
I have a table.
First column is a date, second column is an index and other columns
contains some other values.
I want to remove, for each date, the row with the smallest index (it
is not necessarily 1).
ex: in the following table, I want to remove
On Sat, Apr 23, 2011 at 9:47 AM, David Winsemius dwinsem...@comcast.net wrote:
On Apr 23, 2011, at 9:26 AM, David Neu wrote:
Hi,
I'd like to change the default orientation of bwplot() and stripplot()
so the plots are displayed vertically. Passing horizontal=FALSE into
stripplot in the
On Apr 23, 2011, at 10:13 AM, David Neu wrote:
On Sat, Apr 23, 2011 at 9:47 AM, David Winsemius dwinsem...@comcast.net
wrote:
On Apr 23, 2011, at 9:26 AM, David Neu wrote:
Hi,
I'd like to change the default orientation of bwplot() and
stripplot()
so the plots are displayed vertically.
On Sat, Apr 23, 2011 at 10:23 AM, David Winsemius
dwinsem...@comcast.net wrote:
On Apr 23, 2011, at 10:13 AM, David Neu wrote:
On Sat, Apr 23, 2011 at 9:47 AM, David Winsemius dwinsem...@comcast.net
wrote:
On Apr 23, 2011, at 9:26 AM, David Neu wrote:
Hi,
I'd like to change the default
On 2011-04-23 07:13, David Neu wrote:
On Sat, Apr 23, 2011 at 9:47 AM, David Winsemiusdwinsem...@comcast.net wrote:
On Apr 23, 2011, at 9:26 AM, David Neu wrote:
Hi,
I'd like to change the default orientation of bwplot() and stripplot()
so the plots are displayed vertically. Passing
On Sat, Apr 23, 2011 at 10:37 AM, Peter Ehlers ehl...@ucalgary.ca wrote:
On 2011-04-23 07:13, David Neu wrote:
On Sat, Apr 23, 2011 at 9:47 AM, David Winsemiusdwinsem...@comcast.net
wrote:
On Apr 23, 2011, at 9:26 AM, David Neu wrote:
Hi,
I'd like to change the default orientation of
On 2011-04-23 08:03, David Neu wrote:
On Sat, Apr 23, 2011 at 10:37 AM, Peter Ehlersehl...@ucalgary.ca wrote:
On 2011-04-23 07:13, David Neu wrote:
On Sat, Apr 23, 2011 at 9:47 AM, David Winsemiusdwinsem...@comcast.net
wrote:
On Apr 23, 2011, at 9:26 AM, David Neu wrote:
Hi,
I'd like
Since it cannot find a java class that is on my disk,
is there a place I have to put it into first?
--
View this message in context:
http://r.789695.n4.nabble.com/Using-Java-methods-in-R-tp3469299p3470350.html
Sent from the R help mailing list archive at Nabble.com.
On 2011-04-23 07:02, David Winsemius wrote:
On Apr 23, 2011, at 9:05 AM, - - wrote:
I have a table.
First column is a date, second column is an index and other columns
contains some other values.
I want to remove, for each date, the row with the smallest index (it
is not necessarily 1).
ex:
Hi,
The rows of a data frame can be sorted lexicographically as shown in
this example,
my.df - data.frame(x=c(1,1,1,2,2), y=c(1,2,3,2,1))
my.df[order(my.df$x,my.df$y, decreasing=TRUE), ]
however, I'm wondering if it's possible to pass a variable in as the
first argument to order() so that the
Hello,
i'm using R.h Rmath.h.
What is the c equivalent to sort(x,deceasing=T)
i.e. to get sort(x) i type R_qsort(x, 1, n), where
do i set the decreasing=T flag ?
More generally, is there a place where the
functions in the R sources are documented ?
Best,
--
View this message in
On Apr 23, 2011, at 1:30 PM, Peter Ehlers wrote:
On 2011-04-23 07:02, David Winsemius wrote:
On Apr 23, 2011, at 9:05 AM, - - wrote:
I have a table.
First column is a date, second column is an index and other columns
contains some other values.
I want to remove, for each date, the row with
On Apr 23, 2011, at 2:10 PM, kv wrote:
Hello,
i'm using R.h Rmath.h.
What is the c equivalent to sort(x,deceasing=T)
i.e. to get sort(x) i type R_qsort(x, 1, n), where
do i set the decreasing=T flag ?
More generally, is there a place where the
functions in the R sources are documented ?
Date: Sat, 23 Apr 2011 05:32:59 -0700
From: hill0...@umn.edu
To: r-help@r-project.org
Subject: Re: [R] Using Java methods in R
No answer to my post,
so let's try a simpler question. Am I doing this correctly?
I have the RGui with R
bstudent wrote:
Hello,
for my diploma thesis I need to program a solver for Merton´s respectively
Black´s and Scholes´ Option pricing formula, which should be achieved for
several dates.
What I want to do is to estimate the value of a firm´s assets vA (x[2]
denotes vA) and the
From: marchy...@hotmail.com
To: hill0...@umn.edu; r-help@r-project.org
Date: Sat, 23 Apr 2011 15:12:30 -0400
Subject: Re: [R] Using Java methods in R
Date: Sat, 23 Apr 2011
Well, the call to Java methods should be really simple in rJava.
What you had tried is actually correct, initialize jvm, create an object, then
call method.
For the error you met, maybe you should check .jaddClassPath.
At 2011-04-23 20:58:22£¬hill0093 hill0...@umn.edu wrote:
That's more than
According to the advice, I tried rms package.
Just to make sure, I have data of 104 patients (x6.df), which consists
of 5 explanatory variables and one binary outcome (poor/good) (previous
model 2 strategy). The outcome consists of 25 poor results and 79 good
results. Therefore, My events per
Hi Hill,
I just finished interfacing the C++ with R, i.e. c++ functions from R
and vice versa. Next thing in pipe line is Java and python.
I just wanted to share some of the things which i think might be
useful for you. Reason being whether its a C++, java or any other
compiled language the
Hello R-world,
I have multiple variables that have been generated within a function.
I would like to assign them each to the Global Environment. I've tried
the following:
x = 1
y = 2
z = 3
for (i in c(x,y,z)) {
assign(i,i,pos=.GlobalEnv)
}
i
[1] 3
Obviously, the problem is that the code is
Em 22/4/2011 21:48, David Winsemius escreveu:
On Apr 22, 2011, at 2:16 PM, JJCV wrote:
Hello.
I did a graphic with the next code:
T=c(10,15,20,25,30)
p=c(1003,1005,1010,1011,1014)
plot(T, p, xlab= ,, ylab= , pch=1, cex=2, lwd=2,
xlim=c(5,30), ylim=c(1000,1015))
abline(lm(p ~ T), lwd=2)
lm(p
Hello,
I apologize if this seems like an obvious question, but I have been looking
everywhere and have yet to find an answer.
I am doing a multinomial regression with multinom() in the nnet package. I
have a 3 level ordered response (ordered()) variable and 4 predictors, 3 of
which are numerical
Naturally I mean that x[1] denotes vA and x[2] denotes sigA !!!
Sorry for this mistake!!!
Thank you and kind regards!!!
bstudent.
--
View this message in context:
http://r.789695.n4.nabble.com/Loop-and-Solver-with-Black-Scholes-Formula-tp3470488p3470494.html
Sent from the R help mailing list
Dear R,
When I'm writing script I probably hit accidently some hot key and then the
text in script is being overwritten
by subsequent typing. Please what is the hot key or how can I disable it?
--
View this message in context:
Hello,
I have a data frame with 2 columns: year and code. In code column, I want to
replace elements that are not 8210, 8310, or 9190 with others.
--
Sincerely,
Yosub Jung.
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing
Hello,
for my diploma thesis I need to program a solver for Merton´s respectively
Black´s and Scholes´ Option pricing formula, which should be achieved for
several dates.
What I want to do is to estimate the value of a firm´s assets vA (x[2]
denotes vA) and the option-implied volatility of
Hi Nick,
It is typically not a good idea to write functions that automatically
assign variables to the global environment (makes it easy to overwrite
something valuable without knowing you are overwriting it), but if
that is really the best choice for your situation, I would do
something like
Hi Shekhar, Thank you. Right path.
Sounds good. Please help me when you discover Java interface.
Firstly, I don't know what the R symbol table is or how to do
the checking you suggest. I am really naive about R.
I want to be able to get my data in there so I can learn to use
it for my purposes.
Hi Derek,
You have not provided us with any of the relevant (or requested in the
posting guide) information which makes it virtually impossible to give
you any sort of useful answer (e.g., what is your operating system?
what version of R are you using? what are you using to write your
script?).
Hi Yosub,
if dat is your data frame, try something like (untested):
dat$code[!dat$code %in% c(8210, 8310, 9190)] - others
the general idea being create a logical vector of codes that match the
three you want, use ! to negate this (so you are getting all codes
NOT in the ones you want), and then
One possibility: If you using a laptop with a touchpad, and
a text editor in which the point of insertion can be moved
by clicking at a position in the text with the mouse, then
it is possible that as you type your wrist or the base of
your thumb is brushing the touchpad, and causing this to
Thank you very much. It was the Insert key. It was very annoying. Actually is
this owerwrite function of any use?
--
View this message in context:
http://r.789695.n4.nabble.com/random-typing-over-text-tp3470428p3470749.html
Sent from the R help mailing list archive at Nabble.com.
Hi,
I am using a function which accepts the string from R and prints it.
But when I am calling .C(main,hello);
it is printing any random thing.
My C function is
void main(char *str)
{
Rprintf(%s,str);
}
Can you help how to achieve this using .C interface?
Thanks
Jaimin
[[alternative
On 11-04-23 2:00 PM, David Neu wrote:
Hi,
The rows of a data frame can be sorted lexicographically as shown in
this example,
my.df- data.frame(x=c(1,1,1,2,2), y=c(1,2,3,2,1))
my.df[order(my.df$x,my.df$y, decreasing=TRUE), ]
however, I'm wondering if it's possible to pass a variable in as the
On 11-04-23 7:04 PM, Jaimin Dave wrote:
Hi,
I am using a function which accepts the string from R and prints it.
But when I am calling .C(main,hello);
it is printing any random thing.
My C function is
void main(char *str)
See Writing R Extensions. The declaration should be char **str.
Duncan
On 11-04-23 6:13 PM, derek wrote:
Thank you very much. It was the Insert key. It was very annoying. Actually is
this owerwrite function of any use?
It's excellent when you want to overwrite text.
Duncan Murdoch
__
R-help@r-project.org mailing list
On Sat, Apr 23, 2011 at 7:06 PM, Duncan Murdoch
murdoch.dun...@gmail.com wrote:
On 11-04-23 2:00 PM, David Neu wrote:
Hi,
The rows of a data frame can be sorted lexicographically as shown in
this example,
my.df- data.frame(x=c(1,1,1,2,2), y=c(1,2,3,2,1))
my.df[order(my.df$x,my.df$y,
Thank you for your help. That works for me.
On Sat, Apr 23, 2011 at 1:53 PM, Joshua Wiley jwiley.ps...@gmail.com wrote:
Hi Nick,
It is typically not a good idea to write functions that automatically
assign variables to the global environment (makes it easy to overwrite
something valuable
How do I assemble ad data fame, consisting of columns form other data
frames identified in a loop? cbind is not working as the initial data
fame has 0 columns and rows.
ModList-dir(./MODEL_DISTS/)
ModList-ModList[grep(pattern=3COLUMNS,ModList)]
ALL_MODELS-data.frame()
for (i in ModList){
Hello R-world,
Please, help me to get round my little mess
I have a data.frame in which I'd rather like some values to be NA for the
future imputation process.
I've come up with the following piece of code:
random.del - function (x, n.keeprows, del.percent){
n.items - ncol(x)
k -
Hello!
I have a set of data of the form (x, y1, y2) where x is the
independent variable and (y1, y2) is the response pair. The model is
some messy non-linear function:
(y1, y2) = f(x; param1, param2, ..., paramk) + (y1error, y2error)
where the parameters param1, ..., paramk are to be
Hey,
Try the following code:
a=c(1,2,3,4,5)
b=c(10,20,30,40,50)
c=c(100,200,300,400,500)
d=c(1000,8210,9000,8310, 7000)
e=c(,,9190,,)
to.replace=c(8210,8310,9190)
df = data.frame(a,b,c,d,e)
xdf - apply(df, 2, function(x) x %in% to.replace)
df[xdf] - others
--
View this message
I would like to create a \% that can be written to a file as I am writing
a procedure to output to latex.
I can't create a \% and it is driving me crazy.
--
x = This is a test % string
gsub (%, \\%, x)
fileConn-file(c:/biostats/test.txt)
writeLines(x,
63 matches
Mail list logo