Hello Soumyadeep,
if you store the data in a tabular file, then I suggest using standard
text-editing tools like cut (say your file is called data.csv, fields
are separated with commas and you want to get rid of the third and
sixth column):
$ cut --complement --delimiter="," --fields=3,6 < data.c
Thanks Oldrich,
Actually I was not sure if I can remove these columns and build model. Thanks
a lot for your kind suggestion. Could you tell me if there any function to
remove these columns from the data matrix.
With best regards,
Soumyadeep
Oldrich Kruza <[EMAIL PROTECTED]> wrote: A rather
A rather technical workaround I see could be adding a row with a
different value. But if a column only ever has one value, then it
contributes nothing to the model and I see no reason why it would have
to be kept.
~ Oldrich Kruza
On Fri, Mar 7, 2008 at 6:45 AM, Soumyadeep nandi
<[EMAIL PROTECTED]>
Can anyone help me with lbfgsb (function for optimization)?
It takes the following parameters:
void lbfgsb (int n, int lmm, double *x, double *lower,
double *upper, int *nbd, double *Fmin, optimfn fn,
optimgr gr, int *fail, void *ex, double factr,
double pgtol, int *fncount, int *grcount,
int max
What should I do if I need to train svm() with data having same value across
all rows in some columns. These must be the important features of the class and
we cant exclude these columns to build up models.
The error I am getting is:
Error in predict.svm(ret, xhold) : Model is empty!
In addition
You can try this good resource
http://www1.maths.lth.se/help/R/R.oo/
RS
On Thu, Mar 6, 2008 at 9:30 PM, Davood Tofighi <[EMAIL PROTECTED]> wrote:
> Dear all,
>
> I was wondering if there a guide/tutorial to the object oriented
> programming
> in R for the beginners.
>
> Thanks,
>
> --
> Davood
Its a bug in na.approx. I just fixed it and (1) until a
new version of zoo comes out add this to your code:
source("http://r-forge.r-project.org/plugins/scmsvn/viewcvs.php/*checkout*/pkg/R/na.approx.R?rev=448&root=zoo";)
or (2) a workaround not requiring that source statement
is to add the na.rm
Dear R help list,
I have a training dataset that looks like Table1.
I have an unknown dataset that looks like Table2.
I want to have a program that should search the training dataset and
identify that the unknown sample belongs to which category (type1, type2 or
type3)
and also if the unknown does
Dear all,
I was wondering if there a guide/tutorial to the object oriented programming
in R for the beginners.
Thanks,
--
Davood Tofighi
Department of Psychology
Arizona State University
[[alternative HTML version deleted]]
__
R-help@r-proje
On Mar 6, 2008, at 9:05 PM, John Taffe wrote:
> Dear R-help list,
>
> I'm new to R. I tried to get R to read a Stata data file using the
> read.dta function in the package "foreign", which I downloaded and
> extracted to "C:\Program Files\R\R-2.6.2\library" on my pc.
>
> I tried
>
>> nora <- rea
Dear R help list,
I have a training dataset that looks like Table1.
I have an unknown dataset that looks like Table2.
I want to have a program that should search the training dataset and
identify that the unknown sample belongs to which category (type1, type2 or
type3)
and also if the unknown does
I've tried without success to calculate interaction and main effects
contrasts using R. I've found the functions C(), contrasts(),
se.contrasts() and fit.contrasts() in package gmodels. Given the url
for a small dataset and the two-way anova model below, I'd like to
reproduce the results from ap
Dear R-help list,
I'm new to R. I tried to get R to read a Stata data file using the
read.dta function in the package "foreign", which I downloaded and
extracted to "C:\Program Files\R\R-2.6.2\library" on my pc.
I tried
> nora <- read.dta("nora.dta")
and got
Error: could not find function
Many people love Mathematica, but it's strength is symbolic
mathematics, not data analysis. Googling for "data analysis in
Mathematica and R" led me to an advertisement for a Mathematica add-on
called "RLink", which is an "exciting new tool [to] leverage the
statistical analysis power of
On 06/03/2008 6:45 PM, Thomas Manke wrote:
> Hi,
>
> I have a character-valued vector (old_names) and want to translate
> its entries whenever possible, using a dictionary (dict=data.frame).
> The translation direction is dict$V3 --> dict$V2, but
> some values may be undefined (NA). I suppose thi
On 06/03/2008 6:46 PM, Shewcraft, Ryan wrote:
> Hi all,
>
> I am trying to install a custom package from its source using windows.
> Using this guide
> http://www.maths.bris.ac.uk/~maman/computerstuff/Rhelp/Rpackages.html
> I've gotten to the fifth step, but I get the following error in the
> comm
On 06/03/2008 6:01 PM, Christophe Genolini wrote:
> Hi the list
>
> I would also like to remove the prompt, in order to let the reader
> cut-and-paste from pdf to R. So I set the prompt to " " with
>
> options(prompt=" ",continue=" ")
>
> But it add an extrat space at the start of each line. I
On 06/03/2008 5:59 PM, Christophe Genolini wrote:
> Hi the list,
>
> I am using Sweave. Between the Sinput and the Soutput, there is always
> an extra line:
>
> > 2+2
>
> [1] 4
>
> Is it possible to remove it ?
Here's some code I worked out a while ago:
% This removes the extra spacing afte
Hi,
I have a character-valued vector (old_names) and want to translate
its entries whenever possible, using a dictionary (dict=data.frame).
The translation direction is dict$V3 --> dict$V2, but
some values may be undefined (NA). I suppose this is a very basic
task, but I tried in vain to make it
On Mar 6, 2008, at 1:49 PM, Mag. Ferri Leberl wrote:
> Dear everybody!
> Is there a command in \LaTeX to display the R-Logo or has anybody
> made it up?
> Thank you in advance.
Isn't it just an image? Hence you would include it like one usually
includes images. Or do you mean something else?
Hi all,
I am trying to install a custom package from its source using windows.
Using this guide
http://www.maths.bris.ac.uk/~maman/computerstuff/Rhelp/Rpackages.html
I've gotten to the fifth step, but I get the following error in the
command window: "'sh' is not recognized as an internal or extern
Thank you all for your help.
SNN wrote:
>
>
>
> Hi All,
>
> I have data for two groups, group with 100 points and group B with 15
> points. i needed plot these two groups in one scatter plot, each group
> with a different color. I tried
>
> plot3d(data, col = c("red", "blue")[c(rep(1, 100)
Hi the list
I would also like to remove the prompt, in order to let the reader
cut-and-paste from pdf to R. So I set the prompt to " " with
options(prompt=" ",continue=" ")
But it add an extrat space at the start of each line. I also try some code
options(prompt="\a",continue="\a")
After a big
Hi the list,
I am using Sweave. Between the Sinput and the Soutput, there is always
an extra line:
> 2+2
[1] 4
Is it possible to remove it ?
> 2+2
[1] 4
Thanks
Christophe
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinf
Hi Felipe,
Try this
dfr <- read.table(
textConnection("percentQ Efficiency
1.5650.0125
1.94 0.0213
0.8760.003736
1.0270.006
1.5360.0148
1.5360.0162
2.6070.02
1.4560.0157
2.16 0.0103
1.6980.0196
1.64 0.0098684
1.8140.0183
2.3940.0107
2.4690.
Assign your anova object a name, like
fm1 <- anova(lm(Efficiency~percentQ,data=dfr))
Then do
names(fm1)
and try
fm1$"Mean Sq"
Notice you were trying to find "Mean Sq" in dfr, your original data.frame.
-Erik Iverson
Felipe Carrillo wrote:
> Hi all:
> Can someone advice me on how to hold th
Hi all:
Can someone advice me on how to hold the residuals
Mean sq value on a string
so it can be used in other calculations.
I was trying something like this:
Msquare<-dfr$Mean sq but fails..Thanks
dfr <- read.table(textConnection("percentQ
Efficiency
1.5650.0125
1.94 0.0213
0.
Hi all
The code of trying to write relates to selecting properties (given by x
and y co-ordinates) spatially (distance "X" from "infected" properties
identified by date) over a certain time period.
i.e. what properties are within 3 km from properties infected on
"2008-01-01" over the last 14 day
I'm stuck, but am sure it can be done I just don't understand how.
I have data in an irregular timeseries. I want to be able to use stl to
visualise the data (see seasonal parts etc), so I need to change to regular
series of class ts (I think).
I am using 2 zoo objects one is regular and the othe
On 3/6/2008 3:57 PM, Shewcraft, Ryan wrote:
> I was able to hack the code in the polspline package in order to change
> the plot.polymars function so that I can set the limits of my y-axis.
> However, I was only able to do this by entering plot.polymars in R,
> copying the code to Word, changing wh
Hi there.
I was wondering if somebody knows how to perform a bagging procedure on a
classification tree without running the classifier with weights.
Let me first explain why I need this and then give some details of what I
have found out so far.
I am thinking about implementing the bagging proc
Thank both of you for the suggestions!
Gang
On Mar 6, 2008, at 2:12 PM, Henrique Dallazuanna wrote:
> Hum you are rigth, I forgot of 'else'.
>
> On 06/03/2008, Benilton Carvalho <[EMAIL PROTECTED]> wrote:
>> no, it won't.
>>
>> you're doing the right math on the "valid" subset... but you're no
I was able to hack the code in the polspline package in order to change
the plot.polymars function so that I can set the limits of my y-axis.
However, I was only able to do this by entering plot.polymars in R,
copying the code to Word, changing what I needed, and then pasting the
new code in R to r
ermimi wrote:
>
> Hello, I´m spanish student, and I´m making the finish project of computer
> science. I´m working in R and I need create a Interface which allow me
> select diferents execution options (similar to a menu). Is posible to
> create this menu,or interface, with R? or I have create
Peter Wolf wiwi.uni-bielefeld.de> writes:
>
> Hallo here is a simple proposal using tcltk-sliders.
>
> Peter Wolf
>
>
> # step 3: test it.
>
> ts.zoom(runif(1), rexp(1), rnorm(1))
>
> Randy Zelick wrote:
>
> >Hello list,
> >
> >Could the following be done without too much grie
Hi, this is not an R-help post, but I found this extract below that was
written by a leading mathematician back in 1999 when he was talking about
statistics and computing. I found it interesting to share and I ask your
opinion do you think this still holds today or things have changed? Thanks.
“.
Try this:
lines <- readLines('yourfile')
newLines <- lines[-(1:(13+3))]
coln <- scan(textConnection(lines[3]), what="")
lapply(which(nchar(newLines) == 4),
function(x)read.table(textConnection(newLines[seq(x + 1, x + 13)]),
col.names=coln))
On 06/03/2008, sean <[EMAIL PROTECTED]> wrote:
> Hi Al
On Thu, 06-Mar-2008 at 12:00PM +, audrey wrote:
[...]
|> In the output, the first plot is represented in the bottom left
|> corner, I would like the plots to be drawn from the top left corner
|> but I cannot find in the Lattice help, the argument to set to do
IIRC, it's as.table = TRUE
Look
Sean
I'm sure there are many ways of doing this. I assume you have read the
data in R as a data.frame with 24 columns and 2+1+13+(1+13)*n rows,
where n is the number of years, and that you want a data.frame with 25
columns (one extra for year) and 13*n rows (although I am not sure why
13 MOnths)
I think you could get this done with the function "tapply", but it's not
clear because you don't give an example of your data. If tapply is not
the answer, certainly there is a way that is better than resorting to
doing it 'by hand' (brute force).
See ?tapply
Best,
Erik Iverson
tieflingrogue
Hello,
For basic linear regression lm() does the job well, for datasets that are
larger than memory biglm() seems to work.
I'm working on a parallel implementation of multiple linear regression for
datasets that are too large for memory.
Currently I am working over least squares:
calcu
On 3/6/2008 2:07 PM, Martin Kaffanke wrote:
> Am Mittwoch, den 05.03.2008, 14:38 -0300 schrieb Henrique Dallazuanna:
>> Try this:
>>
>> On 05/03/2008, Martin Kaffanke <[EMAIL PROTECTED]> wrote:
>>> Hi there!
>>>
>>> In my case,
>>>
>>> cor(d[1:20])
>>>
>>> makes me a good correlation matrix.
>>>
I have a data set which has, let's say, income by state. I'm trying to
output income quartiles for each state into an array by doing a loop so that
I don't have to do it state by state by hand.
ie, something like
for (i in 1:50) {
quantile(subset(data,state==i)$income) -> r[i,5] }
where
no, it won't.
you're doing the right math on the "valid" subset... but you're not
returning the zeros where needed therefore, the whole thing will
get recycled to match the dimensions.
b
On Mar 6, 2008, at 2:03 PM, Henrique Dallazuanna wrote:
I think this should work:
array(A[abs(B)
Please provide a example of what you want
On 06/03/2008, Martin Kaffanke <[EMAIL PROTECTED]> wrote:
>
> Am Mittwoch, den 05.03.2008, 14:38 -0300 schrieb Henrique Dallazuanna:
>
> > Try this:
> >
> > On 05/03/2008, Martin Kaffanke <[EMAIL PROTECTED]> wrote:
> > > Hi there!
> > >
> > > In my
Am Mittwoch, den 05.03.2008, 14:38 -0300 schrieb Henrique Dallazuanna:
> Try this:
>
> On 05/03/2008, Martin Kaffanke <[EMAIL PROTECTED]> wrote:
> > Hi there!
> >
> > In my case,
> >
> > cor(d[1:20])
> >
> > makes me a good correlation matrix.
> >
> > Now I'd like to have it one sided, means
Hi All,
I need to parse data from a file, example shown below. The first two lines
can be skipped, the third line contains the column names. The next 13 lines
can be skipped. The next line "1991" is a year value, with the following 13
values data for that year. The file then repeats this forma
Hum you are rigth, I forgot of 'else'.
On 06/03/2008, Benilton Carvalho <[EMAIL PROTECTED]> wrote:
> no, it won't.
>
> you're doing the right math on the "valid" subset... but you're not
> returning the zeros where needed therefore, the whole thing will
> get recycled to match the dimension
I think this should work:
array(A[abs(B) > 10e-5]/B[abs(B) > 10e-5], dim=c(L, M, N, P))
On 06/03/2008, Gang Chen <[EMAIL PROTECTED]> wrote:
> I have two arrays A and B with dimensions of (L, M, N, P) and (L, M,
> N), and I want to do
>
> for (i in 1:L) {
> for (j in 1:M) {
> for (k in 1:N) {
apparently you forgot the "commented, minimal, self-contained,
reproducible code" part...
L = 10
M = 20
N = 30
P = 40
set.seed(1)
A = array(rnorm(L*M*N*P), dim=c(L, M, N, P))
B = array(rnorm(L*M*N), dim=c(L, M, N))
B[sample(100, 10)] = 0
C = array(0, dim=c(L, M, N, P))
for (i in 1:L) {
for (j i
Dear everybody!
Is there a command in \LaTeX to display the R-Logo or has anybody made it up?
Thank you in advance.
Yours, sincerely
Mag. Ferri Leberl
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the po
I have two arrays A and B with dimensions of (L, M, N, P) and (L, M,
N), and I want to do
for (i in 1:L) {
for (j in 1:M) {
for (k in 1:N) {
if (abs(B[i, j, k]) > 10e-5) C[i, j, k,] <- A[i, j, k,]/B[i, j, k]
else C[i, j, k,] <- 0
}
}
}
How can I get C more efficiently than looping?
Thanks
Hello Everyone,
Recently I was given a Java servlet based web calculator that will
call R (libR.so to be exact) but I am having trouble trying to disable R
from requiring --save, --no-save or --vanilla... Is there any way to
build R on linux and disable R from asking --save, --no-save or --
He, Yulei hcp.med.harvard.edu> writes:
> Could someone tell me a simple function of plot ROC curve and calculate
> AUC in R? My setting is very simple, a column of the true binary
> response and another column of predicted probabilities.
There are a few packages with examples around, which you c
He, Yulei wrote:
> Hi, there:
>
>
>
> Could someone tell me a simple function of plot ROC curve and calculate
> AUC in R? My setting is very simple, a column of the true binary
> response and another column of predicted probabilities.
>
>
>
> Thanks!
>
>
>
> Yulei
ROC area is easy. Se
Hi, there:
Could someone tell me a simple function of plot ROC curve and calculate
AUC in R? My setting is very simple, a column of the true binary
response and another column of predicted probabilities.
Thanks!
Yulei
[[alternative HTML version deleted]]
__
Hi Aaron:
Look at:
http://article.gmane.org/gmane.comp.lang.r.mac/2305
Do take time to read the R Posting FAQ. A query to the mail-list
archive would have shown that this problem has been discussed
repeatedly.
HTH,
-Roy M.
On Mar 6, 2008, at 9:34 AM, Aaron Solomon Adelman wrote:
> Greet
Greetings.
Yesterday I decided to try out Rcmdr, but it refused to load. I
traced the problem to the library tcltk, which when I tried to load it
told me this:
> > library(tcltk)
> Loading Tcl/Tk interface ... Error in fun(...) :
> Can't find a usable init.tcl in the following directories:
Am Donnerstag, den 06.03.2008, 17:47 +0100 schrieb Petr PIKAL:
> Hi
>
> [EMAIL PROTECTED] napsal dne 06.03.2008 17:41:06:
>
> > Hi there,
> >
> > When i do
> >
> > mean(fl[1:20], na.rm=T)
>
> e.g.
>
> sum(!is.na(fl[1:20]))
This seems to give me a sum of all the items.
But I'd like to have
Martin -
Does the following help?
sapply(fl, function(x) sum(!is.na(x)))
See ?sapply
Best,
Erik Iverson
Martin Kaffanke wrote:
> Hi there,
>
> When i do
>
> mean(fl[1:20], na.rm=T)
> sd(fl[1:20], na.rm=T)
>
> I get 20 Results, but now I'd like to know from how many numbers my mean
> and s
On Thu, 2008-03-06 at 09:41 -0700, Greg Snow wrote:
> I think you need a par(xpd=NA) before the legend command (At least it
> did not show up for me until I set xpd).
Hi Greg,
Yes, you are correct. Apologies to the OP, Georg. I must have set xpd =
NA during my tests and not reset it, so when I ra
Hi
[EMAIL PROTECTED] napsal dne 06.03.2008 17:41:06:
> Hi there,
>
> When i do
>
> mean(fl[1:20], na.rm=T)
e.g.
sum(!is.na(fl[1:20]))
Regards
Petr
> sd(fl[1:20], na.rm=T)
>
> I get 20 Results, but now I'd like to know from how many numbers my mean
> and sd are calculated.
>
> How to I u
Hi Martin,
Try
x=c(NA,NA,rnorm(50),NA)
sum(!is.na(x))
HTH
Jorge
On Thu, Mar 6, 2008 at 11:41 AM, Martin Kaffanke <[EMAIL PROTECTED]>
wrote:
> Hi there,
>
> When i do
>
> mean(fl[1:20], na.rm=T)
> sd(fl[1:20], na.rm=T)
>
> I get 20 Results, but now I'd like to know from how many numbers my me
I think you need a par(xpd=NA) before the legend command (At least it
did not show up for me until I set xpd).
For positioning the overall title and legend, one option is the
cnvrt.coords function in the TeachingDemos package.
To center the overall title over the central column plots (the defau
Depending on the way you ran randomForest, the variable of interest may
have been used in many splits in many trees. The information can be
extracted using the getTree() function. However, I suspect it might be
more useful to look at partialPlot().
Best,
Andy
> -Original Message-
> Fro
Hi there,
When i do
mean(fl[1:20], na.rm=T)
sd(fl[1:20], na.rm=T)
I get 20 Results, but now I'd like to know from how many numbers my mean
and sd are calculated.
How to I use the length() for this, or is this possible?
Because there are missing values in some, but not in all columns. So
ther
hsl.gov.uk> writes:
[snip]
> Try:
> nrows <- 5
> mm <- matrix(rnorm(30),nrow=nrows)
> sd.by.col <- apply(mm,2,sd)
> mean.by.col <- apply(mm,2,mean)
> values <- 1-mapply(pnorm, q=as.vector(mm), mean=rep(mean.by.col,
> nrows)), sd=rep(sd.by.col, nrows))) values <- matrix(value
Chandra,
While I can't advise on how to use the ipf function in the cat package,
I can offer the following function that we use here to balance rebalance
arrays with new marginal totals.
#ipf.R
#Function to iteratively proportionally fit a multidimensional array
#IPF also known as Fratar method,
Ah, I see where we are talking past each other. In my particular analysis
(I'm looking at deviations from a predicted value), any deviation from 0
(whether due to grand mean or not) is actually very very interesting. What
is ultimately interesting to me is the sign of that difference, but, I nee
(this is a resend)
Hi R help,
I run my data in nnet with skip layer, factor response (with 0 & 1
values) and explicitly put softmax=T to compare the result of the
default nnet with no softmax specification. I assume this should give
me the same result. I got the result from the default one, b
hsl.gov.uk> writes:
[snip]
> Try:
> nrows <- 5
> mm <- matrix(rnorm(30),nrow=nrows)
> sd.by.col <- apply(mm,2,sd)
> mean.by.col <- apply(mm,2,mean)
> values <- 1-mapply(pnorm, q=as.vector(mm), mean=rep(mean.by.col, nrows)),
> sd=rep(sd.by.col, nrows)))
> values <- matrix(values, nrow=5)
>
>
This is a bit ugly but I think it works.
myf <- function(x) 1-pnorm(x,mean(x), sd(x))
results <- apply(test, 2, myf)
mymeans <- apply(test, 2, mean); mymeans
for (i in 1:length(test)){
test[,i][test[,1]>=mymeans[i]] <- NA
}
results[is.na(tes
On Thu, 6 Mar 2008, Henrik Andersson wrote:
> Can anyone explain the results from switch below when a single
> charachter "E" is entered? It seems to work with letter S or N...
?switch
.
.
.
Warning:
Beware of partial matching: an alternative 'E = foo' will match
the first argument
Hi Michael,
I had the same problem using R 2.6.0. Not it's fixed in newer versions.
HTH
Jorge
On Thu, Mar 6, 2008 at 8:05 AM, michael watson (IAH-C) <
[EMAIL PROTECTED]> wrote:
> Hi
>
> I'm using 2.6.0 on Windows XP SP2. I realise I'm on an old version,
> please tell me if the problem is fix
> I've read in a csv file (test.csv) which gives me the following table:
>
>Hin1 Hin2 Hin3Hin4 Hin5 Hin6
> HAI1 9534.83 4001.74 157.16 3736.93 484.60 59.25
> HAI2 13272.48 1519.88 36.35 33.64 46.68 82.11
> HAI3 12587.71 5686.94 656.62 572.29 351.60 136.91
> H
Hi Everyone,
I am trying to find a way to do this in excel to tell me which genes are the
most differentially expressed. Sorry, i couldn't find excel forum section in
nabble. However, if it is in R it is fine. This is a microarray data, and it
has been normalized. According to Dov Stekel in Micro
Hi,
I've read in a csv file (test.csv) which gives me the following table:
Hin1 Hin2 Hin3Hin4 Hin5 Hin6
HAI1 9534.83 4001.74 157.16 3736.93 484.60 59.25
HAI2 13272.48 1519.88 36.35 33.64 46.68 82.11
HAI3 12587.71 5686.94 656.62 572.29 351.60 136.91
HAI4
Thanks for all the ideas. splinefun looks like the simplest way to
achieve what I need:
> x <- 1:10
> y <- x^2
> f <- splinefun(x,y)
> f(3,deriv=0)
[1] 9
> f(3,deriv=1)
[1] 6
> f(3,2)
[1] 2
> f(3,3)
[1] -3.330669e-16
The fda package has a function bsplineS which does nearly the same
thing, and t
Hi
not sure about zoo but data frame or matrix can be indexed
mat[is.na(mat)] <-
Regards
Petr
[EMAIL PROTECTED]
[EMAIL PROTECTED] napsal dne 06.03.2008 14:09:16:
> This is the same set of data that I have been working with for those
> in the know. it is a matrix of ~174 columns and ~70,0
er MIMI & piki PIKINHA wrote:
>
> Hello, I´m spanish student, and I´m making the finish project of
> computer science. I´m working in R and I need create a Interface
> which allow me select diferents execution options (similar to a menu)
> . Is posible to create this menu,or interface, with R? o
phthao05 wrote:
> Dear All,
> In a package, I want to use PCA function. The structure I used follow this
> page: http://www.statmethods.net/advstats/factor.html.
>fit<-principle(mydata, nfactors=9, rotation=TRUE)
>or:
>result<-PCA(mydata)
>
> But I don't known why R languag
Hi
[EMAIL PROTECTED] napsal dne 05.03.2008 18:04:35:
> Thank you Yinghai, that's what I need :-)!
>
> Yinghai Deng <[EMAIL PROTECTED]> schrieb: m <- seq(-1,1,0.1)
> x1 <- c()
> x2 <- c()
> for(i in 1:length(m)){
> x1[i] <- m[i]
> x2[i] <- m[i]^2
> }
> dat <- data.frame(x1,x2)
The
It works just the same as matrices:
> z <- zoo(cbind(a = c(1, NA, 3), b = c(NA, 10, 11)))
> z[is.na(z)] <- 999
> z
a b
1 1 999
2 999 10
3 3 11
>
There are also a number of other methods for handling NAs in zoo:
na.approx
na.contiguous
na.locf
na.spline
na.trim
and na.stinterp in the
Hi
I'm using 2.6.0 on Windows XP SP2. I realise I'm on an old version,
please tell me if the problem is fixed in the newer versions.
When I try and use the graphics window menu to save a graph as PDF, I
get the following error, and no PDF produced
Error: Invalid font type
In addition: Warning m
This is the same set of data that I have been working with for those
in the know. it is a matrix of ~174 columns and ~70,000 rows. I have
it as a zoo object, but I could read it in as just a matrix as long as
the date time stamp won't be corrupted.
here is an example of what a column would look
On 3/5/08, phthao05 <[EMAIL PROTECTED]> wrote:
> 1) I don't know why PCA rotation function not run although I try many times.
> Would you please hepl me and explain how to read the PCA map (both of
> rotated and unrotated) in a concrete example.
If you used the example from here [1], there's a
Henrique Dallazuanna wrote:
> Try this:
>
> switch(menu(c("Normal", "Uniform")), A=rnorm(5), B=runif(5))
>
> for more details see ?menu
>
It might be more to the point to look into the tcltk package (or one of
the other GUI packages) and its demos. (Also look at James Wettenhall's
website).
-
Hello, I´m spanish student, and I´m making the finish project of computer
science. I´m working in R and I need create a Interface which allow me select
diferents execution options (similar to a menu). Is posible to create this
menu,or interface, with R? or I have create this interface with othe
Try this:
switch(menu(c("Normal", "Uniform")), A=rnorm(5), B=runif(5))
for more details see ?menu
On 06/03/2008, ermimi <[EMAIL PROTECTED]> wrote:
>
> Hello, I´m spanish student, and I´m making the finish project of computer
> science. I´m working in R and I need create a Interface which allow
If I understand:
barplot(x)
axis(1)
On 06/03/2008, Hyunchul Kim <[EMAIL PROTECTED]> wrote:
> Hi, all
>
> I drew a barplot with
>
> > barplot(data1, beside=TRUE)
>
> and then, I want to labels with hist() like x-axis ticks.
>
> How can I do this?
>
> Thanks in advance,
> Hyunchul
>
>
Hello, I´m spanish student, and I´m making the finish project of computer
science. I´m working in R and I need create a Interface which allow me
select diferents execution options (similar to a menu). Is posible to create
this menu,or interface, with R? or I have create this interface with other
l
Hi there,
whether clara is a proper way of clustering depends strongly on what your data
are and particularly what interpretation or use you want for your
clustering. You may do better with a hierarchical method after having defined a
proper distance (however this would rather go into statisti
What should I do if I need to train svm() with data having same value across
all rows in number of columns. These must be the deterministic features of the
class and we cant exclude these columns to build model.
The error I am getting is:
Error in predict.svm(ret, xhold) : Model is empty!
Is t
Dear all,
I am running something similar to this short example:
library("lattice")
library("geneplotter")
X=matrix(cbind(1:100,100:1,c(1:50,50:1)),ncol=3)
Y=matrix(cbind(1:100,1:100,1:100),ncol=3)
names=1:3
dummy.df = data.frame(names = factor(names, levels = names),
x = seq_along(names),
y
Hi Dirk,
Wow!!! That is really useful (and I was completely unaware of it). Thanks!
('sudo apt-get install littler' continued to work perfectly in all the
machines I use).
Thanks,
R.
P.D. One more reason to sign up for your tutorial on useR 2008.
On Thu, Mar 6, 2008 at 2:35 AM, Dirk Eddelbu
Hi Dani,
If you are working with NMR data, which data pretreatment methods you
are using? 13112 variables for NMR data sounds too lot, you should apply
some data binning or peak picking methods for data reduction.
Also you must consider multicollinearity problems related to
spectroscopic data, the
Hi, all
I drew a barplot with
> barplot(data1, beside=TRUE)
and then, I want to labels with hist() like x-axis ticks.
How can I do this?
Thanks in advance,
Hyunchul
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PL
Can anyone explain the results from switch below when a single
charachter "E" is entered? It seems to work with letter S or N...
> switch("East",West=1,East=2) # Correct
[1] 2
> switch("E",W=1,E=2) # Not so correct
[1] 1
> switch("E",E=1,W=2) # Even stranger
[1] "E"
> switch("S",N=1,S=-1) # Corr
Humm... but I mistakenly thought I was assuming almost nothing.
R.
On Wed, Mar 5, 2008 at 10:38 PM, Jeffrey Horner
<[EMAIL PROTECTED]> wrote:
> Ramon Diaz-Uriarte wrote on 03/05/2008 03:00 PM:
>
> > Dear Prof. Ripley,
> >
> > Yes, of course! You are right. What a silly mistake on my part! I w
Keizer_71 wrote:
>
> I have this in excel
>
> Control
> 543_BU
> 123_AT
> 432_CU
>
> I want to be able to import to R so that it will read like this
>
> c<-c("543_BU","123_AT","432_CU")
>
> output:
> [1] "543_BU" "123_AT" "432_CU"
>
> This is just a short version. I have about 20 rows and
1 - 100 of 121 matches
Mail list logo