Buenos días,
Nunca di clases de R pero creo que la mejor forma de aprender es siempre,
hacer las cosas tu mismo. Así que, como tu dices, lo mejor es hacer que los
alumnos hagan pequeñas practicas sobre pequeños tips de teoria. No sé muy
bien que teoria daras, pero por ejemplo enseñando a hacer
You can use system() or shell(), which adds "cmd.exe /c " to the front of
your command
so you can use DOS syntax. Remember to add double quotes when file names
have
spaces in them. E.g., I can call an old version of R with the following
and later read its
text output into my current session.
>
?system
But this begs the question: WHY would you want to do this? More
specifically, what should R communicate to your other software, and
what should the other software communicate to R?
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and
Jun:
"My problem is the pattern has to be dynamically constructed on the
input data of the function "
What does that mean? How can a pattern be "dynamically constructed"
when you have not made clear (at least to me, perhaps also to yourself
and/or others) *how* it is to be constructed?
Cheers,
Hi Ista,
Thanks for the suggestion. I didn't know mapply can be used this way! Let
me take one more step. Instead of defining a pattern for each string, I
would like to define a set of patterns from all the possible combination of
the unique values of those variables. Then I need each string to
Buen día a todos:
les agradezco de antemano su ayuda sobre este tema relacionado a R pero no
del lenguaje de R.
Voy a dar un pequeño curso-taller de introducción al lenguaje de R a
estudiantes de maestría y doctorado (primer semestre) en Ecología y
quisiera conocer algunos tips o recomendaciones
Hi Jeff,
Thanks for the reply. I tried your suggestion and it doesn't seem to work
and I tried a simple pattern as follows and it works as expected
sub("(3\\.mg\\.kg)\\.(>50-70\\.kg)\\.(.*)", '\\1', "3.mg.kg.>50-70.kg.P05")
[1] "3.mg.kg"
sub("(3\\.mg\\.kg)\\.(>50-70\\.kg)\\.(.*)", '\\2',
Hi all R users:
Does anybody have the experience of running an external software in R? I
try to use R to run ANSYS software, which is a engineering simulation
package. I ever have done this task in Matlab platform by executing
the following code line:
system('"C:\Program Files\Ansys
Hi Bert,
In the final.pattern, there are ten patterns.
>sub(final.pattern, '\\1', test.string)
Expected results: "240.m.g" "3.mg.kg" "240.m.g"
Current results: "" "" "240.m.g"
>sub(final.pattern, '\\2', test.string)
Expected results: ">110.kg" ">110.kg" ">50-70.kg"
Current results: "" ""
I am not near my computer today, but each parenthesis gets its own result
number, so you should put the parenthesis around the whole pattern of
alternatives instead of having many parentheses.
I recommend thinking in terms of what common information you expect to find in
these various strings,
Hi Bert,
I still couldn't make the multiple patterns to work. Here is an example. I
make the pattern as follows
final.pattern <-
Estimados
Tengo una duda
E(datos.network)[[inc('LoQueBusco')]]
+ 20/6795 edges (vertex names):
E(datos.network)[E(datos.network)$Cosa=="'LoQueBusco'"]
+ 78/6795 edges (vertex names):
La primer forma es 20/… la segunda 78/… ¿Los resultados no tendrían que ser
idénticos? Estos datos son pocos
Hola,
Dell es los pocos que yo sepa que ofrecen equipos con Linux instalado como
SO de base:
http://www.dell.com/es/empresas/p/xps-13-9350-laptop-ubuntu/pd?oc=bnx9333
Saludos,
Carlos Ortega
www.qualityexcellence.es
El 6 de septiembre de 2016, 21:33, Ruben Tobalina Ramirez <
Hola,
En los gráficos "base", las barras se construyen repartiéndolas sobre el
eje "X". Para saber sobre qué punto cae el punto intermedio, la forma de
hacerlo es recuperando los valores del objeto "barplot" como has hecho. Y
una vez recuperados, utilizas estos puntos para pintar líneas de forma
Hola.
Siguiendo a Mittal (2001); R Graph Cookbook creo haber logrado construir el
gráfico de barras que buscada. La matriz que utilizo para el "height" va
adjunta.
Y mi sintaxis:
barplot(t(barras), col=col.segmentos, border=F
, names.arg=Meses, las=2, cex=.75, cex.axis=0.8
,
Buenas,
gracias a los que me ayudaron, he conseguido hacer el código más o menos
como queria. Lo pego por aqui por si a alguien le interesa. Me hubiese
gustado hacerlo en dos ejes pero tengo que entregar la practica de la
especialidad en 3 dias y hay muchas cosas que revisar, pero ya que he visto
Es más fácil si usas matplot. Mira ?matplot para más información. Saludos
cordiales. --JIV
2016-09-06 13:48 GMT-05:00 Sebastian Kruk :
> Estimados usuarios-de-R:
>
> Tengo un problema.
>
> Si por ejemplo tengo una lista conformada por la serie historia del PBI de
>
Estimados usuarios-de-R:
Tengo un problema.
Si por ejemplo tengo una lista conformada por la serie historia del PBI de
10 paìses.
>Tiempo <- seq(1:100)
>plot(Tiempo, PP$"Serie 1", type="l",col="1")
>lines(Tiempo, PPcapita$"Serie 2")
>lines(Tiempo, PPcapita$"Serie 3")
>lines(Tiempo,
On Tue, Sep 6, 2016 at 2:00 AM, Rainer M Krug wrote:
> Please reply to the mailing list to keep the conversation available for
> everybody. I Send this mail to the mailing list as well.
>
> Simone Tenan writes:
>
>> Thanks Rainer,
>> it's very kind of
Hi Sebastian,
here are examples with ggplot2 and basic graphic.
http://stackoverflow.com/questions/3777174/plotting-two-variables-as-lines-using-ggplot2-on-the-same-graph
http://stackoverflow.com/questions/17150183/r-plot-multiple-lines-in-one-graph
You may also impress your audience by using
For a linear model without an intercept term as in this example, neither
the usual permutation scheme for testing Ho: B1 = 0 nor usual definition of
R-squared apply. So you need to check what the developer of this code
chose to do. If I'm recalling correctly, in a linear model with an
intercept
?lines
?points
to add to an existing base graphics graph. There are other ways to do
this in the other graph systems (ggplot, lattice,...) used in R.
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka
That is contributed code. It could do anything the author felt like. I
recommend reading the source code.
--
Sent from my phone. Please excuse my brevity.
On September 5, 2016 11:52:15 PM PDT, Agustin Lobo wrote:
>Any reason why the R-square prob is not calculated by
Thank you for your reply. I am grouping citation and some social media
indictors ( number of tweets, mendeley readers, etc). The number of
citaions a paper recievs or the number of social media indicators that a
papers receives depends on time. For example a paper published in 2009 has
more time
That step is easy, but context is hard. You really need to provide a
reproducible example. There are many models, many analysis tools, and many
timescales to choose from. In fact, this could easily be mistaken for a
question about statistics (not really on-topic here) since you have failed to
It is not the implementation of regex that requires double backslashes, but the
R string parser. You can use cat to see what the pattern looks like to the
parser. Try
cat( "\\(.*?\\)" )
--
Sent from my phone. Please excuse my brevity.
On September 6, 2016 6:33:15 AM PDT, Sarah Goslee
Estimado Luisfo
Gracias por la acotación, tendía que ver ese cambio, hora ¿el resultado sería
el mismo al crear el subgrafo o hay una diferencia entre el subgrafo entre:
subgraph.edges y induced.subgraph? Yo pienso que colocando correctamente los
parámetros el resultado no debería ser
You can ignore the message below. The maximizing routine buried within the frailty()
command buried with coxph() has a maximizer that is not the brightest. It sometimes gets
lost but then finds its way again. The message is from one of those. It likely took a
not-so-good update step, and
On 06 Sep 2016, at 11:00 , Rainer M Krug wrote:
> Please reply to the mailing list to keep the conversation available for
> everybody. I Send this mail to the mailing list as well.
>
> Simone Tenan writes:
>
>> Thanks Rainer,
>> it's very kind of you.
Dear R-users:
Let's see if you can help.
I have an matrix of class "ts" of 100 rows by 4 columns which called PP.
In each column I have the time series of quarterly GDP from 4 countries.
They applied the Hodrick -Prescott filter and now I want to plot
simultaneously cyclical component of the 4
R's implementation of regex requires double backslashes. Reading
?regex will tell you more.
cleanBetweenBrackets <- function(String)
{
return(gsub("\\(.*?\\)", "", String))
}
Str <- "The cat is crazy (but not too crazy)"
cleanBetweenBrackets(Str)
> cleanBetweenBrackets(Str)
[1] "The cat is
Hi,
Is it possible to use time as an offset (exposure variable) in factor
analysis? If yes, would you please advise how?
Thanks,
Tahereh
Tahereh Dehdarirad
PhD Student of Library and Information Science
University of Barcelona, Spain
[[alternative HTML version deleted]]
Hi Rosa,
you may take advantage of the extremevalues package.
https://cran.r-project.org/web/packages/extremevalues/extremevalues.pdf
An example:
set.seed(1023)
v3 <- c(rnorm(100, 0, 0.2), rnorm(5, 4, 0.1), rnorm(5, -4, 0.1))
v4 <- sample(v3, length(v3))
nam <- as.character(1:length(v4))
df <-
Hello,
I have been able to figure this out using \\ (two back slashes for escape)
Working R code for what I wanted is...
cleanBetweenBrackets <- function(String)
{ return(gsub("\\(.*?\\)", "", String))}
I thought I had tried that (the \\) before I emailed the list. Please
ignore my previous
?traceback
?debug
?trace
R has built-in debugging tools. Learn to use them.
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Mon, Sep 5, 2016 at
Just noticed: My clumsy do.call() line in my previously posted code
below should be replaced with:
pat <- paste(pat,collapse = "|")
> pat <- c(pat1,pat2)
> paste(pat,collapse="|")
[1] "a+\\.*a+|b+\\.*b+"
replace this **
> pat <- do.call(paste,c(as.list(pat),
Hello,
I am trying to remove brackets and the text contained in brackets. I tried
to do a user defined formula... my attempt at this is pasted below.
cleanBetweenBrackets <- function(String)
{ return(gsub("\(.*?\)", "", String))}
I keep getting errors (namely that there is an unrecognised
Any reason why the R-square prob is not calculated by randomization in
lmPerm::lmp? The help pages states "Either permutation test p-values
or the usual F-test p-values will be output", but I always get the F
test for R-square as with lm():
require(lmPerm)
x <- 1:1000
set.seed(1000)
y1 <-
Dear R-Team,
I have been trying to use the finegray routine that creates a special data
so that Fine and Gray model can be fit. However, it does not seem to work.
Could you please help me with this issue?
Thanks,
Ahalya.
[[alternative HTML version deleted]]
Estimado Javier,
Me alegra que hayas avanzado con tu error.
Te respondo a esto último.
La función induced.subgraph() espera como segundo parámetro una lista de
los IDs de los vértices, mientras que tú le estás pasando una lista de
'edges'.
Prueba lo siguiente:
c <-
You need to *print* results explicitly within a for-loop.
E.g.
print(head(d_dataset[,
c(paste0("v_turnover_",year),
paste0("v_customer_", year))]))
See FAQ 7.16 for a related discussion.
cheers,
Rolf Turner
--
Technical Editor ANZJS
Department of Statistics
University
Hi All,
I would like to write a program that iterates over a set of dynamically
generated variables and produces some stats or prints parts of the data.
# --- data
v_turnover_2011 <- c(10, 20, 30, 40 , 50)
v_customer_2011 <- c(0, 1, NA, 0, 1)
v_turnover_2012 <- c(10, 20, 30, 40 , 50)
Hola Javier.
Por lo que comentas (que como bien dice Carlos Ortega, es una
información incompleta) parece que el detonante del error es que la
máquina entre en suspensión/economode.
Varias preguntas
- Es un portátil? un sobremesa?
- Has probado si te pasa eso (en esas condiciones) con otro
Please reply to the mailing list to keep the conversation available for
everybody. I Send this mail to the mailing list as well.
Simone Tenan writes:
> Thanks Rainer,
> it's very kind of you.
> Unfortunately, I cannot save the (large) R object where the current R
Simone Tenan writes:
> Hi all,
> I'm using R remotely via ssh connection in linux. I need to save a large R
> object from the remote server to my laptop. How can I specify the path in
> the save() function?
You are working on the remote machine and there is no way that
Hi all,
I'm using R remotely via ssh connection in linux. I need to save a large R
object from the remote server to my laptop. How can I specify the path in
the save() function?
Thanks much for your help,
Simone
[[alternative HTML version deleted]]
Hi
Well, it seems to me that it is coded in different language like C++.
The code is not reproducible but the error seems to be from your call of ts
You can check it line by line with setting i to arbitrary value and inspect how
your objects look like, however some of your constructions seems
47 matches
Mail list logo