On 10/11/2010 07:46 AM, Craig O'Connell wrote:
I need to find the area under a trapezoid for a research-related project. I
was able to find the area under the trapezoid in MATLAB using the code:
function [int] = myquadrature(f,a,b)
% user-defined quadrature function
% integrate data f
Thank you Peter. That is very much helpful. If you don't mind, I continued
running the code to attempt to get my answer and I continue to get inf inf
inf... (printed around 100 times).
Any assistance with this issue. Here is my code (including your corrections):
Hi,
The first argument of myquadrature in result shouldn't be val but f I
guess. At least it works for me
result=myquadrature(f,0,2000)
print(result)
[1] 3
Regards,
Alain
On 11-Oct-10 09:37, Craig O'Connell wrote:
Thank you Peter. That is very much helpful. If you don't mind, I
Hi
I'm trying to calculate densities for the multivariate noncentral t
distribution. For the avoidance of doubt, and becuase there do seem to
be at least two definitions for a noncentral t distribution, This is a
noncentral t distribution of the sort described in McNeill Frey and
Embrechts
How about:
sum(unlist(strsplit(b,NULL))==;)
# [1] 5
(More transparent, at least to me ... ). See '?strsplit',
and note what is said under Value.
Ted.
On 11-Oct-10 04:35:43, Michael Sumner wrote:
Literally:
length( gregexpr(;, b)[[1]])
But more generally, in case b has more than one
I need to transpose the following input dataset into an output dataset like
below
Input
Date
TICKER
Price
11/10/2010
A
0.991642
11/10/2010
B
0.475023
11/10/2010
C
0.218642
11/10/2010
D
0.365135
12/10/2010
A
0.687873
12/10/2010
B
0.47006
12/10/2010
C
0.533542
Hi,
I have the following data frame, where col2 is a startdate and col3 an
enddate
COL1 COL2 COL3
A 4046240482
B 4046240478
The above timeframe of 3 weeks I would like to splits it in weeks like this
COL1 COL2 COL3 COL4
A
Dear Bert,
Use the plyr package to do the magic
library(plyr)
dataset - data.frame(COL1 = c(A, B), COL2 = 40462, COL3 = c(40482,
40478))
tmp - ddply(dataset, COL1, function(x){
delta - with(x, 1 + COL3 - COL2)
rows - rep(1, delta %/% 7)
if(delta %% 7 0){
On Mon, Oct 11, 2010 at 5:25 AM, Bert Jacobs
bert.jac...@figurestofacts.be wrote:
Hi,
I have the following data frame, where col2 is a startdate and col3 an
enddate
COL1 COL2 COL3
A 40462 40482
B 40462 40478
The above timeframe of 3 weeks I
Using R, I plotted a log-log plot of the frequencies in the Brown Corpus
using
plot(sort(file.tfl$f, decreasing=TRUE), xlab=rank, ylab=frequency,
log=x,y)
However, I would also like to add lines showing the curves for a Zipfian
distribution and for Zipf-Mandelbrot.
I have seen these in many
Dear All
Do you know how to make a heatmap and use cosine correlation for
clustering? This is what my colleague can do in gene-math and I want to
do in R but I don't know how to.
Thanks a lot
Leila
__
R-help@r-project.org mailing list
Hi Mehdi,
Take a look at the spatial task view [1] and the r-sig-geo mailing [2] list.
cheers,
Paul
[1] http://cran.r-project.org/web/views/Spatial.html
[2] https://stat.ethz.ch/mailman/listinfo/r-sig-geo
On 10/10/2010 06:11 AM, Mehdi Zarrei wrote:
Dear R-users,
I have the following problem:
I would like to estimate the density curve for univariate data between 0
and 1. Unfortunately, the density function in the stats package is just
capable to cut the curve at a left and a right-most point. This
truncation would lead to an
I have the y-axe in a grafich that has as extreme limit 0.00 and 1.50. plot
gives me the interval 0.0, 0.5,1.0,1.5 but I want:
0.00,0.15,0.30 and so on with 2 decimals. How can I do? Thanks
[[alternative HTML version deleted]]
__
Hi,
Try this:
plot(seq(0,1.5,0.1), yaxt=n)
axis(2, at=seq(0.00,1.50, 0.15))
To understand read ?par (especially the yaxt argument in that case, but
I guess you need to know more about that) and ?axis
HTH,
Ivan
Le 10/11/2010 14:07, barbara.r...@uniroma1.it a écrit :
I have the y-axe in a
I am using cascaple() in vegan, is it permissible to have more than
one conditioning variable thus
capscale(DIST~varaible1+variable2+Conditon(varaible3+variable4),
data=mydata)
many thanks
Nevil Amos
__
R-help@r-project.org mailing list
On 11-Oct-10 12:07:43, barbara.r...@uniroma1.it wrote:
I have the y-axe in a grafich that has as extreme limit 0.00 and 1.50.
plot gives me the interval 0.0, 0.5,1.0,1.5 but I want:
0.00,0.15,0.30 and so on with 2 decimals. How can I do? Thanks
[[alternative HTML version deleted]]
On Mon, 2010-10-11 at 23:42 +1100, Nevil Amos wrote:
I am using cascaple() in vegan, is it permissible to have more than
one conditioning variable thus
capscale(DIST~varaible1+variable2+Conditon(varaible3+variable4),
data=mydata)
Yes. Have you tried it and had problems doing it? Or is this
SNN s.nancy1 at yahoo.com writes:
I am conducting an association analysis of genotype and a phenotype such as
cholesterol level as an outcome and the genotype as a regressor using
multiple linear regression. There are 3 possibilities for the genotype AA,
AG, GG. There are 5 people with the AA
On 11/10/10 15:42 PM, Nevil Amos nevil.a...@gmail.com wrote:
I am using cascaple() in vegan, is it permissible to have more than
one conditioning variable thus
capscale(DIST~varaible1+variable2+Conditon(varaible3+variable4),
data=mydata)
Nevil,
Yes, it is permissible.
Cheers, Jari
Repost .. since the previous msg had problems
I need to transpose the following input dataset into an output dataset like
below
Input
DateTICKER Price
11/10/2010 A 0.991642
11/10/2010 B 0.475023
11/10/2010 C
Hi Paul,
That's pretty much awesome. Thank you very much.
And combined with the colorspace package functions- rainbow_hcl() and
sequential_hcl() -make color selection easy. One thing i was digging for
was a function that yields a color palette *and* the hcl() call needed
to produce it. This
try this:
x - read.table(textConnection(DateTICKER Price
+ 11/10/2010 A 0.991642
+ 11/10/2010 B 0.475023
+ 11/10/2010 C 0.218642
+ 11/10/2010 D 0.365135
+ 12/10/2010
Thank you both for your advice. I ended up implementing both solutions and
testing them on a real dataset of 10,000 rows and 50 inds. The results are
very, very interesting.
For some context, the original two approaches, nested lapply and nested for
loops, performed at 1.501529
and 1.458963
On Mon, 11 Oct 2010, Karl Brand wrote:
Hi Paul,
That's pretty much awesome. Thank you very much.
And combined with the colorspace package functions- rainbow_hcl() and
sequential_hcl() -make color selection easy. One thing i was digging for was
a function that yields a color palette *and*
Dear R colleagues,
I am trying to plot some geophysical data as a filled contour on a continent
map and so far the guidance from the R-help archives has been invaluable. The
only bit that still eludes me is the colour key (legend) coming with
filled.contour:
I prefer to generate my own colour
On Mon, Oct 11, 2010 at 9:35 AM, Santosh Srinivas
santosh.srini...@gmail.com wrote:
Repost .. since the previous msg had problems
I need to transpose the following input dataset into an output dataset like
below
Input
Date TICKER Price
11/10/2010 A
Dear all
I am trying to use the cov function in the stats library. I have no problem
using this function from the console. However, in my R script I received a
function not found message. Then I called stats::cov(...) and received an
error message that the function was not exported. Then I
I have data that looks like this:
start end value
1 4 2
5 8 1
9 100
I want to transform the data so that it becomes:
startend value
1 2
2 2
3 2
4 2
5 1
6
On Oct 11, 2010, at 10:27 AM, Barth B. Riley wrote:
Dear all
I am trying to use the cov function in the stats library. I have no
problem using this function from the console. However, in my R
script I received a function not found message. Then I called
stats::cov(...) and received an
Hello All,
I want Ranks' Table in R as like in SPSS ouput in the given link.
http://www.statisticssolutions.com/methods-chapter/statistical-tests/kruskal-wallis-test/
Is the code is already available? Please let me know.
Thanks,
Lawrence
__
Dear All,
I am trying to create socket clusters (using snow and snowfall) with a
Windows OS. I am running Windows inside VirtualBox and VMware player
(i.e., Windows is guest) from a Debian Linux host system (I've tried
in two different Linux systems, an AMD x86-64 workstation and an Intel
i686
This should be easy with apply()
do.call(rbind, apply(dataset, 1, function(x){
list(data.frame(startend = x[1]:x[2], value = x[3])
}))
Untested!
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek
team
On Mon, Oct 11, 2010 at 10:16 AM, clee cheel...@gmail.com wrote:
I have data that looks like this:
start end value
1 4 2
5 8 1
9 10 0
I want to transform the data so that it becomes:
startend value
1 2
2
On Oct 11, 2010, at 10:16 AM, clee wrote:
I have data that looks like this:
start end value
1 4 2
5 8 1
9 100
I want to transform the data so that it becomes:
startend value
1 2
2 2
3 2
Hi Rashid,
you may have a look at the colorRampPalette-function, along with the
at argument oh heatmap.2
x-matrix(runif(100,-6,6),nrow=10)
heatmap.2(x,col=colorRampPalette(c(blue,lightblue,darkgray,darkgray,yellow,red),space=Lab),at=c(-6.01,6.01,51))
# or just using the colors you posted
sorry, typo:
heatmap.2(x,col=colorRampPalette(c(blue,lightblue,darkgray,darkgray,yellow,red),space=Lab),at=c(-6.01,6.01,51))
heatmap.2(x,col=c(blue,lightblue,darkgray,black,darkgray,yellow,red),at=-3:3*2)
should be read as
On Oct 11, 2010, at 9:43 AM, Lawrence wrote:
Hello All,
I want Ranks' Table in R as like in SPSS ouput in the given link.
http://www.statisticssolutions.com/methods-chapter/statistical-tests/kruskal-wallis-test/
Is the code is already available? Please let me know.
Yes. All code is
alain,
Perhaps i'm still entering the code wrong. I tried using your
result=myquadrature(f,0,2000)
print(result)
Instead of my:
val = myquadrature(f,a,b)
result=myquadrature(val,0,2000)
print(result)
...and I am still getting an inf inf inf inf inf...
Did you change any of the
I'm working with 3 different data sets and applying this non-linear
regression formula to each of them.
nls(Y ~ (upper)/(1+10^(X-LOGEC50)), data=std_no_outliers,
start=list(upper=max(std_no_outliers$Y),LOGEC50=-8.5))
Previously, all of the regressions were calculated in Prism, but I'd like to
be
Hi,
I've a table like the following. I want to do ANOVA. Could you please tell
me how can i do it.
I want to show whether the elements (3 for each column) of a column are
significantly different or not.
Just to inform you that i'm a new user of R
bp_30048741 bp_30049913 bp_30049953
... and, in fact, simply googling on R Package Hausmann finds two
Hausmann test functions in 2 different packages within the first half
dozen hits.
-- Bert
On Sat, Oct 9, 2010 at 11:06 AM, Liviu Andronic landronim...@gmail.com wrote:
Hello
On Sat, Oct 9, 2010 at 2:37 PM, Holger Steinmetz
Type ?anova on your R command line for the basic function, and links
to related functions.
Also, try a google search of something like doing anova in R and you
should find multiple tutorials or examples.
Andrew Miles
On Oct 11, 2010, at 11:33 AM, Mauluda Akhtar wrote:
Hi,
I've a table
Dear users,
As an alternative to RSvgDevice::devSVG, I have tried using Cairo and
cairoDevice.
When opening the svg file from Cairo::CairoSVG() as well as from
cairoDevice::Cairo_svg() in Illustrator, I got a warning message (which
is damn hard to translate since I don't understand it),
Hi Moon,
Here is something to get you started.
# Read Data into R
dat - read.table(textConnection(
bp_30048741 bp_30049913 bp_30049953 bp_30049969 bp_30049971 bp_30050044
[1,] 69 46 43 54 54 41
[2,] 68 22 39
Look at the logspline package. It uses a different method from what density
does, but it can take boundaries into account.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From:
Hello
On Mon, Oct 11, 2010 at 5:33 PM, Mauluda Akhtar maulud...@gmail.com wrote:
Hi,
I've a table like the following. I want to do ANOVA. Could you please tell
me how can i do it.
I want to show whether the elements (3 for each column) of a column are
significantly different or not.
Just
dear list,
i just found this post in the archive:
On 23-Apr-05 Bill.Venables at csiro.au
https://stat.ethz.ch/mailman/listinfo/r-help wrote:
:* -Original Message-*:* From: r-help-bounces at stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-help *:*
Hi All,
Does anyone know of a function to plot a regression surface for two
predictors? RSiteSearch()s and findFn()s have not turned up what I
was looking for. I was thinking something along the lines of:
http://mallit.fr.umn.edu/fr5218/reg_refresh/images/fig9.gif
I like the rgl package
Hello.
I would be very grateful if you could help me in using R.
I need R commands of pseudo random value and qvazi (quazi) random value.
I found commands qnorm and pnorm, but I am not sure that this is the
same as I am looking for.
Looking forward to hearing from you. Thank you
How do I run my own unique function in eclipse?
--
View this message in context:
http://r.789695.n4.nabble.com/running-own-function-in-Java-tp2990420p2990420.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org
Hello,
I wonder what analysis i have to use to evaluate which environmental
variables most closely related to the grouping that I have.
I has 38 streams are grouped based on eight environmental variables, but I
wonder how these variables relate to these groups.
Example.: PH, dissolved oxygen
Colleagues,
[R 2.11; OS X]
I am processing a file on the fly that contains the following text:
XXXáá
[email clients may display this differently -- the string is three X's followed
by two instances of the letter a with an acute accent]
I read the file with:
X -
Hi all,
I have the folloing data table
%%
TypeBATCH RESPONSE
SHORT A 22
SHORT A 3
SHORT A 16
SHORT A 14
SHORT A 8
SHORT A 27
SHORT A 11
SHORT A 17
SHORT B 12
SHORT B 17
SHORT B 11
SHORT
On Mon, 2010-10-11 at 10:18 -0700, vascomc wrote:
Hello,
I wonder what analysis i have to use to evaluate which environmental
variables most closely related to the grouping that I have.
I has 38 streams are grouped based on eight environmental variables, but I
wonder how these variables
Casper -
I think you want
dotplot(BATCH~RESPONSE,data=d,subset=Type=='SHORT')
or
dotplot(BATCH~RESPONSE,data=subset(d,Type=='SHORT'))
- Phil Spector
Statistical Computing Facility
Dear Josh,
On Mon, Oct 11, 2010 at 3:15 PM, Joshua Wiley jwiley.ps...@gmail.com wrote:
Hi All,
Does anyone know of a function to plot a regression surface for two
predictors? RSiteSearch()s and findFn()s have not turned up what I
was looking for. I was thinking something along the lines
Hi Spector,
Yes, that is exactly what I was aiming for.
Thanks.
Casper
--
View this message in context:
http://r.789695.n4.nabble.com/dot-plot-by-group-tp2990469p2990495.html
Sent from the R help mailing list archive at Nabble.com.
__
And now I just wonder why the ' bty='n' ' won't work?
I did
dotplot(BATCH~RESPONSE,data=d,subset=Type=='SHORT',bty='n')
and tried other bty parameters, none is working
Casper
--
View this message in context:
http://r.789695.n4.nabble.com/dot-plot-by-group-tp2990469p2990500.html
Sent from
On 11/10/2010 3:36 PM, Dennis Fisher wrote:
Colleagues,
[R 2.11; OS X]
I am processing a file on the fly that contains the following text:
XXXáá
[email clients may display this differently -- the string is three X's followed
by two instances of the letter a with an acute accent]
I
Dear Andrew Miles,
Thanks a lot.
Moon
On Mon, Oct 11, 2010 at 9:54 PM, Andrew Miles rstuff.mi...@gmail.comwrote:
Type ?anova on your R command line for the basic function, and links to
related functions.
Also, try a google search of something like doing anova in R and you
should find
Dear Liviu,
Thanks a lot.
moon
On Tue, Oct 12, 2010 at 1:02 AM, Liviu Andronic landronim...@gmail.comwrote:
Hello
On Mon, Oct 11, 2010 at 5:33 PM, Mauluda Akhtar maulud...@gmail.com
wrote:
Hi,
I've a table like the following. I want to do ANOVA. Could you please
tell
me how can i do
Hi everyone,
I am using the sqlQuery function (in RODBC library) to import data from a
database into R. My table (called temp) in the database looks like this:
categorynumabc 54469517.307692307692def36428860.230769230769
I used the following R code to pull data into R:data
I am trying to apply Spencer's 15-point weighted moving average filter
to the time series shampoo, using the filter command, but I am not
sure if I am using the filter correctly:
library(fma)
sma15 - c(-.009, -.019, -.016, .009, .066, .144, .209, .231,
.209,
I would assume that the digitis are not being chopped off. It is just
that R will typically print data to 7 significant digits:
x - 54469517.307692307692
x
[1] 54469517
options(digits=20)
x
[1] 54469517.3076923
Your data it there and you can set 'options' to show it if you want
to. Also
There is also wireframe() in lattice and bplot in rms.
-Ista
On Mon, Oct 11, 2010 at 3:49 PM, G. Jay Kerns gke...@ysu.edu wrote:
Dear Josh,
On Mon, Oct 11, 2010 at 3:15 PM, Joshua Wiley jwiley.ps...@gmail.com wrote:
Hi All,
Does anyone know of a function to plot a regression surface for
On Oct 11, 2010, at 3:55 PM, casperyc wrote:
And now I just wonder why the ' bty='n' ' won't work?
Left open is the answer to the question ... work ... how?
Because dotplot is a lattice function?
... and bty is a base graphic parameter?
You could try to give par.settings a list that
I try to fit a LDA model to a TermDocumentMatrix with the topicmodels
package...
but R says:
Error in LDA(TDM, k = k, method = Gibbs, control = list(seed = SEED, :
x is of class “TermDocumentMatrix”“simple_triplet_matrix”
class(TDM)
[1] TermDocumentMatrixsimple_triplet_matrix
I try to
I don't know the answer, but let me point out that:
DocumentTermMatrix %in% class(TDM) should return FALSE since:
DocumentTermMatrix != TermDocumentMatrix
--
David.
On Oct 11, 2010, at 4:45 PM, Dario Solari wrote:
I try to fit a LDA model to a TermDocumentMatrix with the topicmodels
Thanks for the quick reply! Hmm, I did not know about the options default.
However, after I set options, it seems like it's still not displaying
correctly. I've tried an even simpler example table with only 6 digits (much
fewer than 20):
categorynum\nabc123.456\ndef
Excuse me...
when i re-read my e-mail i saw my mistake!
I use a TermDocumentMatrix instead of a DocumentTermMatrix...
On 11 Ott, 22:45, Dario Solari dario.sol...@gmail.com wrote:
I try to fit a LDA model to a TermDocumentMatrix with the topicmodels
package...
but R says:
Error in LDA(TDM, k
Thanks for everyone's responses. Just to follow up, here is a working
version of my original. The code is not pretty, but it functions.
Assuming you have the 'rgl' package installed and have sourced this
function, here are some examples:
RegSurfaceDemo(mpg ~ vs + wt, data = mtcars)
Hi,
Does anybody know how to fit a support vector machine regression with right
censored time-to-event response to select the best subset among several
predictor variables?
Thanks in advance.
__
R-help@r-project.org mailing list
Hi,
I am trying to find the best way to read 85 tick data files of format:
head(nbbo)
1 bid CON 09:30:00.72209:30:00.722 32.71 98
2 ask CON 09:30:00.78209:30:00.810 33.14 300
3 ask CON 09:30:00.80909:30:00.810 33.14 414
4 bid CON 09:30:00.78309:30:00.810 33.06
On Mon, Oct 11, 2010 at 5:39 PM, rivercode aqua...@gmail.com wrote:
Hi,
I am trying to find the best way to read 85 tick data files of format:
head(nbbo)
1 bid CON 09:30:00.722 09:30:00.722 32.71 98
2 ask CON 09:30:00.782 09:30:00.810 33.14 300
3 ask CON 09:30:00.809
Date: Mon, 11 Oct 2010 14:39:54 -0700
From: aqua...@gmail.com
To: r-help@r-project.org
Subject: [R] Slow reading multiple tick data files into list of dataframes
[...]
Is there a better/quicker or more R way of doing this ?
While there may be an
Hello
How to compare two statistical histograms? How i can know if these histograms
are equivalent or not??
Regards
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
Note that R is case sensitive, so cov and Cov are different.
From: Barth B. Riley bbri...@chestnut.org
To:r-help@r-project.org r-help@r-project.org
Date: 12/Oct/2010 3:31a
Subject: [R] Trouble accessing cov function from stats library
Dear all
I am trying to use the cov function in the stats
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
On Behalf Of Craig O'Connell
Sent: Monday, October 11, 2010 8:10 AM
To: alain.guil...@uclouvain.be
Cc: r-help@r-project.org; pda...@gmail.com
Subject: Re: [R] MATLAB vrs. R
alain,
I write about R every weekday at the Revolutions blog:
http://blog.revolutionanalytics.com
and every month I post a summary of articles from the previous month
of particular interest to readers of r-help.
In case you missed them, here are some articles related to R from the
month of September:
I apologize for the noise. I didn't clean up the code enough. See below.
snip
Craig,
I haven't seen an answer to this yet, so let me jump in. You seem to have
some stuff still leftover from MATLAB. Here is some cleaned up code that
produces the result you expect. I don't think the
Hi R-users,
I have a problem running my R code on a Linux cluster. What I did was
write a .pbs file to instruct the cluster on what to do and how:
#!/bin/sh
#PBS -m ae
#PBS -M uqlca...@uq.edu.au
#PBS -A uq-CSER
#PBS -N job1_lollo
#PBS -l select=1:ncpus=1:NodeType=fast:mem=8GB
Dear List,
I am trying to plot date vs. time, but am having problems getting my y-axis
labels how I want them. When left on its own R plots time at 6 hour intervals
from 03:00 to 23:00. I am wanting 6 hour intervals from 2:00 to 22:00. I
realize yaxp doesn't work in plot(), so I am trying
Hello everyone ... I have a problem when I try to mix expressions using the
function expression () with variables coming from my code. Has anyone faced
such a problem?
--
View this message in context:
http://r.789695.n4.nabble.com/expression-problem-tp2990891p2990891.html
Sent from the R help
On Oct 11, 2010, at 7:27 PM, michel.mas wrote:
Hello everyone ... I have a problem when I try to mix expressions
using the
function expression () with variables coming from my code. Has
anyone faced
such a problem?
Many times:
?bquote # instead of expression
--
View this message
Two things I see. First is that par needs to be called _before_ the
plot (although its effects will persist if you need to keep hacking
away) and the second is that yaxp is expecting numeric arguments
(which you are offering) but in your case these will need to be the
numeric values in
use 'axis' with 'at=' and 'labels=' to put your own labels on the axis.
Have to guess at your data since you did not provide a reproducible example:
x - seq(as.POSIXct('2010-10-11 00:00'), as.POSIXct('2010-10-12
00:00'), length = 20)
plot(x, x, type = 'o', yaxt = 'n')
axis.POSIXct(2, at =
For 100,000 rows, it took about 2 seconds to read it in on my system:
system.time(x - read.table('/recv/test.txt', as.is=TRUE))
user system elapsed
1.920.082.08
str(x)
'data.frame': 196588 obs. of 7 variables:
$ V1: int 1 2 3 4 1 2 3 1 2 3 ...
$ V2: chr bid ask ask bid ...
Hi
Just used this function on my real data - several enormous files (80 rows
by 200 columns...) and it worked perfectly! Thanks again for your help, saved
me a lot of time!
A last quick query, I have several other similar problems to deal with in my
data - do you know a useful book or
Must be your datrabase interface:
require(sqldf)
# don't have MySql, but will use sqlite as example
myData - data.frame(cat = c('abc', 'def'), num=c(123.456, 7890.1234))
myData
cat num
1 abc 123.456
2 def 7890.123
sqldf('select cat, num from myData') # now make sql request
cat
That is embarrassingthanks for pointing out my mistake.
Chris
--
View this message in context:
http://r.789695.n4.nabble.com/Time-OffSet-From-GMT-Losing-it-tp2968940p2990987.html
Sent from the R help mailing list archive at Nabble.com.
__
Daniel,
That's it! Thanks. Your help is very much appreciated. I'm hoping to
nail down the code conversion from MATLAB to R, but it seems to be a bit more
difficult that I had anticipated.
Craig
From: djnordl...@frontier.com
To: djnordl...@frontier.com; r-help@r-project.org
Dear all
I want to create dataset with MCAR type from my dataset.
I have my dataset with 100 records, and I want to create dataset from this
dataset to missing 5 records.
How I can do it.
THX
Jumlong
--
Jumlong Vongprasert
Institute of Research and Development
Ubon Ratchathani Rajabhat
Hello,
I have an example file which can be generated using:
dat - read.table(tc - textConnection(
'T T,G G T
C NA G G
A,T A A NA'), sep=)
I also have a reference file with the same number of rows, for example:
G
C
A
I would like to transform the file to numerical values using the following
Hello Jumlong,
I'm not sure whether by '100 records' you mean a vector of 100 values
or a matrix / data.frame of 100 rows.
For a vector or matrix X you can do this:
X[ sample( length(X), 5 ) ] - NA
For a data.frame X you could do this:
X[ sample( nrow(X), 5 ), sample( ncol(X), 5) ] - NA
Hope
Hello,
Here's one way to do it. It assumes dat has character values, not factors.
dat2 - matrix(0, nrow(dat), ncol(dat))
dat2[ is.na(dat) ] - NA
dat2[ apply(dat, 2, function(x) grepl(,, x)) ] - 2
dat2[ apply(dat, 2, function(x) x != ref) ] - 1
Michael
On 12 October 2010 13:24, burgundy
Hello all
I have what seems like a simple question but have not been able to find an
answer on the forum. I'm trying to define a function which involves
regression models and a large number of covariates.
I would like the function to accept any number of covariates and, ideally, I
would like to
Sachin,
I apologize if I'm over-simplifying your question. I mostly run R on an
Ubuntu server via a Windows laptop. I log in to the remote server via SSH
(via PuTTY on Windows), and then open an interactive R session through the
usual ways (typing 'R' at the Linux command line). When creating
Dear list,
I want to make a plot based on the following information, using the command
plot.
variable A for x axis : temperature (range: -20 degrees to 40 degree)
variable B for y axis : altitude (range: 50 m to 2500 m )
The data below 0 degree of X variable wants to be erased tentatively.
Hello Tim,
This function will do it where the covariates are provided as separate
arguments. It would be easy to modify this to handle a list too.
function(outcome, ...) {
arg.names - as.character(match.call())[-1]
nargs - length(arg.names)
f - as.formula(paste(arg.names[1], ~,
1 - 100 of 108 matches
Mail list logo