I highly recommend making friends with the str function. Try
str( 1 )
str( 1:2 )
for the clue you need, and then
sapply( 1:2, identical, 1L )
--
Sent from my phone. Please excuse my brevity.
On April 8, 2016 3:24:31 PM PDT, "Paulson, Ariel" wrote:
>Sorry if this has been answered elsewhere,
Wrong list. This is not the Ubuntu shell support mailing list. The fact that
you are using R to get at the operating system command line doesn't make this
an R question.
--
Sent from my phone. Please excuse my brevity.
On April 8, 2016 2:18:40 PM PDT, Maria Ninova wrote:
>Hello, I came acros
Hello,
I changed the last 3 lines from v1 and v2 to myData$v1 and myData$v2.
Creating the vectors in not a problem.
Where you will run into issues is when you create the data.frame.
The length of v1 is 1001 and the length of v2 is 651.
The warning message below is telling us that the lengths of
Hello, I came across the following oddity when it comes to file order
using the system command: different system commands return files in a
different order:
This is a real filenames example:
> system("ls gw1kb_tables/rpkm_47*", intern=T)
[1] "gw1kb_tables/rpkm_479_Input.tab"
[2] "gw1kb_tables/r
Sorry if this has been answered elsewhere, but I can't find any discussion of
it.
Wondering why the following situation occurs (duplicated on 3.2.2 CentOS6 and
3.0.1 Win2k, so I don't think it is a bug):
> sapply(1, identical, 1)
[1] TRUE
> sapply(1:2, identical, 1)
[1] FALSE FALSE
> sapply(1
On 09/04/16 06:57, Muhammad Bilal wrote:
Hi All,
I am new to R and don't know how to achieve it.
I am interested in generating a hypothetical dataframe that is consisted of say
two variables named v1 and v2, based on the following constraints:
1. The range of v1 is 500-1500.
2. The mean of v1
You are not using that function as it was designed to be used. You should read
the help for gsub...
?gsub
And if you don't know what the term "regular expression pattern" that is
mentioned there means then you will probably need to study one of the many fine
tutorials that are available on th
Dear Val,
Your question isn't entirely clear (to me), but this is what I think you want
to do:
-- snip
> strings <- c("ASk/20005-01-45/90", "Alldatk/25-17-4567/990")
> location <- regexpr("-[0-9]*", strings)
> x
[1] "01" "17"
> x <- substring(strings, location +
Hi all
I am trying t extract a variable from a column
ASk/20005-01-45/90
Alldatk/25-17-4567/990
I want to assign a variable to the numbers coming the first"-"
x=01 for the first and
x=17 for teh second
I tried using gsub but did not work
x=gsub("-")
any help?
[[altern
Yes, that's annoying. I'm 99% sure that the root cause is that pbkrtest got
upgraded and the new version depends on R >= 3.2.3. Since Rcmdr depends on car
which imports pbkrtest, you get in trouble if your R is not at least at 3.2.3.
The easiest way out is probably to upgrade R.
-pd
> On 08 Ap
Hi,
I use Rcmdr for a lot of data analysis, but within the last month my
computer had just shut down. It took a couple of days to get it up and
running, but then R and Rstudio wouldn't load. I had to reinstall it but
now whenever I try to access Rcmdr I get an error message.
> library(Rcmdr)
Loadi
Hi All,
I am new to R and don't know how to achieve it.
I am interested in generating a hypothetical dataframe that is consisted of say
two variables named v1 and v2, based on the following constraints:
1. The range of v1 is 500-1500.
2. The mean of v1 is say 1100
3. The range of v2 is 300-950.
Thanks for these perfectly consistent replies - I didn't understand the purpose
of m = sum(w * f/sum(w)) and saw it merely as a weighted average of the fitted
values.
My ultimate concern is how to compute an appropriate weighted TSS (or
equivalently, MSS) for PRESS-R^2 = 1 - PRESS/TSS = 1 - PRE
As Burt pointed out, your plan is not advisable (that is putting it
diplomatically) and not about R, but we can use R to show you why it is not
advisable. What you are doing is inherently circular. You use the data to
create groups and then you test the groups against the data you used to create
Dear R Experts
that's my original equation
> x=c(2,4)
> Y1=sum(sapply(1:2,function(i){sum(sapply(1:i,function(j){(3^(x[i]+x[j]))}))}))
>
> y1
[1] 7371
I want to write the inside function (3^(x[i]+x[j])) in a more condensed form
cause this will help me when the multiple summations are more t
I believe the package "rattle" can do this.
If not, see page 5 of the PDF below.
https://cran.r-project.org/web/packages/Hotelling/Hotelling.pdf
On 04/08/2016 06:54 AM, Michael wrote:
I am doing a cluster analysis with hclust. I want to get hclust to output the
Hotelling's T squared statisti
On Fri, Apr 8, 2016 at 10:51 AM, James Hirschorn
wrote:
>
>
> On 04/06/2016 07:58 PM, Joshua Ulrich wrote:
>>
>> On Tue, Apr 5, 2016 at 9:17 PM, James Hirschorn
>> wrote:
>>>
>>> OpCl works on xts objects but not on quantmod.OHLC objects. Is this a
>>> bug?
>>>
>> Thanks for the minimal, reproduc
Hello,
How can I print out the p-value or the t-test value for coefficients estimated
from a likelihood function.
Thanks
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read t
1. Where did you get the idea that this was a good thing to do?
2. Don't do it.
3. Do not reply to r-help: my comments are about statistics, not R,
and so further discussion is off topic here. Either ignore me or post
follow up to a statistics list like stats.stackexchange.com .
Cheers,
Bert
I am trying to draw maps for the world using:
library(rworldmap)
library(maptools)
library(RColorBrewer)
tmp2<- dput(head(pece,10))
structure(list(iso3 = c("AUS", "AUT", "BEL", "CAN", "CHE", "CHL",
"CZE", "DEU", "DNK", "ESP"), eps_score = c(0.877343773841858,
2.68984365463257, 1.31406247615814,
Dear R Forum,
I have R installed on a SUSE Linux server. The version of R is 3.2.4
Revised. I have been trying to install R commander on the server to provide
a GUI for code development, however when I come to install Rcmdr via
install.packages(“”,repos=c(“
http://cran.revolutionanalytics.com”),d
On 08 Apr 2016, at 12:57 , Duncan Murdoch wrote:
> On 07/04/2016 5:21 PM, Murray Efford wrote:
>> Following some old advice on this list, I have been reading the code for
>> summary.lm to understand the computation of R-squared from a weighted
>> regression. Usually weights in lm are applied t
Hello,
You're right, sorry, I missed the parenthesis:
colordata$response <- (colordata$color == 'blue') + 0
Rui Barradas
Quoting Michael Artz :
> Fyi, This statement returned the following error
> 'Error in "Yes" + 0 : non-numeric argument to binary operator'
>
>
> On Thu, Apr 7, 2
On 07/04/2016 5:21 PM, Murray Efford wrote:
Following some old advice on this list, I have been reading the code for
summary.lm to understand the computation of R-squared from a weighted
regression. Usually weights in lm are applied to squared residuals, but I see
that the weighted mean of the
Hi
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Michael
> Artz
> Sent: Friday, April 8, 2016 3:50 AM
> To: Hadley Wickham
> Cc: r-help@r-project.org
> Subject: Re: [R] simple question on data frames assignment
>
> Why am I better off with true and
Hi
The question does not make much sense so as your code. Maybe you shall spend
some time with R tutorials.
1. lapply or sapply is basically hidden cycle
2. function shall return something, yours does not
So if you want some binary outcome from a vector you can use e.g.
f <- func
26 matches
Mail list logo