> On 21 Apr 2016, at 22:17, MD. HABIBUR RAHMAN wrote:
>
> Dear Sir,
> I am an R user.
> I am in problem to find eigen vectors in R.
> For the following matrix eigen vectors are not right. I can not understand
> why??
> For the 1st eigen value and 2nd eigen value are same, but the eigen vectors
>
Hi
Normally data in data frames are considered column wise and ggplot expects this
ggplot(yourdataframe, aes(x=some column, y=other column, colour=grouping
factor, ...)
So if you want to use ggplot, you shall transpose your data frame and reshape
it to long format.
See
?ggplot
?t
?reshape
?me
Hi Ogbos,
Here is your sample data plotted in roughly the same way as the image.
You can get the hours to start at the bottom, but it will require more
code.
swe$hour<-as.numeric(sapply(strsplit(swe$time,":"),"[",1))
swe$FD<-sample(1:2,nrow(swe),TRUE)
library(plotrix)
clock24.plot(swe$count,swe$ho
The function knox of the "Surveillance" package performs Knox test for
space-time interaction. The output is supposed to give the numbers of
events that occur in a specific distance in space and time define by the
function arguments. This function also perform a Monte Carlo permutation
test, which
Dear R Users,
I am encountering a problem when reading nc files into R using the ncdf and
ncdf4 libraries. The nc files are too large to attach an example (but if
someone is interested in helping out I could send a file privately via an
online drive), but the code is basic:
for(i in 1:length(t
I'm very new to R and I live in Mali, west Africa. I'm on *OS X 10.7.5*. I
downloaded and installed *R 3.2.1*. I downloaded and installed *RStudio
00.99.893*.
I ran through the free Microsoft data camp intro to R course, then started
another free course through 'edX', for Data and Statistics for L
Hi all,
I have a data frame df and I want to do subset based on several conditions of
letters of the names in Command.1)if the names contain PD 2)if the names
contain t1 3)if the names contain t2 4)if the names contain t1 and PD 5)if the
names contain t2 and PD 6)otherwise the names would be
Hi
I have two columns in data frame. First column is based on "ID" assigned to
each group of my data (similar ID depicts one group). From second column, I
want to identify highest value among each group and want to assign the same ID
to that highest value.
Right now the data looks like:
ID
I don't use PostGreSQL, but I strongly suspect that you would have this problem
using other drivers as well, so pick any method described in the PostGreSQL
documentation to verify that you can reach the server and your dbname from the
machine where you are running R. Note that where you are conn
Assuming your dataframe is in a variable x:
> require(dplyr)
> x %>% group_by(ID) %>% summarise(maxVal = max(Value,na.rm=TRUE))
On Fri, 2016-04-22 at 13:51 +, Saba Sehrish via R-help wrote:
> Hi
>
>
> I have two columns in data frame. First column is based on "ID" assigned to
> each grou
You may investigate a solution based on regular expressions.
Some tutorials to help:
http://www.regular-expressions.info/rlanguage.html
http://www.endmemo.com/program/R/grep.php
http://biostat.mc.vanderbilt.edu/wiki/pub/Main/SvetlanaEdenRFiles/regExprTalk.pdf
https://rstudio-pubs-static.s3.ama
On heroku the database uri is stored in an environment variable.
> db_uri = Sys.getenv(''DATABASE_URL')
I'm not sure if you can use that directly or if you will need to parse
it for username, password etc.
On Thu, 2016-04-21 at 16:49 +0100, Izaak Rogan wrote:
> Hi,
>
> I'm having trouble connec
Dear Tim
1 - if this is a specific RStudio problem best to use their forums
2 - please try not to post in HTML as it mangles your messages
3 - I think you will find that you are getting a _warning_ not an
_error_ about the package being built under 3.2.5 when you are running 3.2.1
4 - my guess
You can use the grepl() function to give you logicals for each criterion,
then combine them as needed. For example:
# example version of Command
Command <- paste0("_localize_", c("PD","t2","t1_seq", "abc", "xyz",
"PD_t1"))
hasPD <- grepl("PD", Command, fixed=TRUE)
hast1 <- grepl("t1", Command, f
On Fri, Apr 22, 2016 at 1:32 AM, Louise Mair wrote:
> Dear R Users,
>
> I am encountering a problem when reading nc files into R using the ncdf
> and ncdf4 libraries. The nc files are too large to attach an example (but
> if someone is interested in helping out I could send a file privately via
>
Hi Louise:
If Dave can’t figure it out, I can give a look also. A couple of things I
would suggest:
1. Don’t use the name “data” in the nc_open command, that is a reserved
command in R and you never know what problems that can cause.
2. You are doing calculations to get set the start and cou
idvalues <- data.frame (ID = c(1, 1, 2, 2, 3, 4, 4, 4, 5, 5),
Value = c(0.69, 0.31, 0.01, 0.99, 1.00, NA, 0,1, 0.5,
0.5))
aggregate(Value~ID, data=idvalues, max)
ID Value
1 1 0.69
2 2 0.99
3 3 1.00
4 4 1.00
5 5 0.50
--
Best,
GG
[[alternative HTML
Base R functions can handle this easily. It is preferable to use dput() as a
compact way of providing data on the list:
> dta <- read.table(text="IDValue
+ 10.69
+ 10.31
+ 20.01
+ 20.99
+ 31.00
+ 4NA
+ 40
+ 41
+ 50.5
+ 5
Since the aggregate S3 method for class formula already has got na.action =
na.omit,
## S3 method for class 'formula'
aggregate(formula, data, FUN, ...,
subset, na.action = na.omit)
I think that to deal with NA's, it is enough:
aggregate(Value~ID, dta, max)
Moreover, passing na.r
I don't think we have enough information to help you with this.
Do you intent the simulated values for growthrate to be selected from the
values in daT$growthrate? Or do these values define a distribution of values
(perhaps ranging between 0 and 1) and the simulation should use that empirical
Dear Experts ,
I am using R with Spark on Windows and now there is a need to move to Ubuntu. I
wanted to know if most of the packages that are available on windows , would
they be available on Ubuntu/Linux? If not can I compile the source code of
those package ? Has any one of you used the pack
Kind Experts,
Many thanks for your guide. I have tried to figure out something that
can help me plot my own data using the examples you referred me to. I
copied part of the code as:
set.seed(44)
N=500
events <- as.POSIXct("2011-01-01", tz="GMT") +
days(floor(365*runif(N))) +
Looks like you forgot to load the lubridate package
library(lubridate)
You are calling functions days(), hours(), minutes(), seconds(), and hour()
which all come from that package.
-
David L Carlson
Department of Anthropology
Texas A&M University
College Sta
Dear All,
One hand. Many thanks!! The code run as soon as I loaded lubridate.
Please can you guide me on how to relate this code to my actual data.
My actual data is looking like:
2005/01/01 00:00 4009
2005/01/01 01:00 3969
2005/01/01 02:00 3946
2005/01/01 03:00 3975
2005/01/01 04:00 396
There are thousands of R packages. The majority work fine on multiple
platforms. Whether your packages are in that group is something only you can
determine.
I will say that Linux is typically better than Windows when it comes to big
data tech, so even if some specific packages don't work the
LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH
source ~/.bash_profile
I still get the same error.
On Thu, Apr 21, 2016 at 7:45 PM, David Winsemius
wrote:
>
> > On Apr 21, 2016, at 1:23 PM, Paul Tremblay
> wrote:
> >
> > I was able to install the curl library with no problems. Howe
It seems that if an S4 class has no slots it can't be instantiated because it
is assumed to be virtual. Is there a way around this other than adding a
do-nothing slot? A singleton would be OK, though is not essential.
Problem:
EmptyFitResult <- setClass("EmptyFitResult", representation=represe
> On Apr 22, 2016, at 12:47 PM, Paul Tremblay wrote:
>
> LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH
> source ~/.bash_profile
On my machine Sys.getenv("LD_LIBRARY_PATH") returns "" in R and echo
$LD_LIBRARY_PATH likewise returns only a carriage return from a bash console,
but
Isn't this why NULL is different than NA?
Alternatively, what about using a data frame with no rows?
--
Sent from my phone. Please excuse my brevity.
On April 22, 2016 1:38:57 PM PDT, "Boylan, Ross" wrote:
>It seems that if an S4 class has no slots it can't be instantiated
>because it is assu
On 04/22/2016 04:38 PM, Boylan, Ross wrote:
It seems that if an S4 class has no slots it can't be instantiated because it
is assumed to be virtual. Is there a way around this other than adding a
do-nothing slot? A singleton would be OK, though is not essential.
Problem:
EmptyFitResult <- s
Hi Carolien,
There was a recent request involving a change in the functionality of
R that may be relevant to your problem. The usual trigger for the
"missing value where TRUE/FALSE needed" error is a conditional
expression that doesn't evaluate because of an NA value. As some
coercion or summary fu
Thanks, Martin, that (inherit from a virtual class) worked great. I already
had a base class created with setUnion, and so this was an easy switch.
I had assumed that since inheriting from a class without slots would produce a
class without slots the result would still be virtual. Fortunately
Hi R-Help,
data at bottom
I've been struggling with a problem where I need to order based on 1) the
Frequency "Freq" and 2) keeping each group of 3 of the same type together
"Var2" but I want across all groups it to go "high to low" based on the
earn factor.
Thank you!
structure(list(Var1 = str
Hi all,
I would like to use a loop for tasks that occurs repeatedly:
# Groups
# Umsatz <= 0: 1 (NICHT kaufend)
# Umsatz > 0: 2 (kaufend)
for (year in c("2011", "2012", "2013", "2014", "2015")) {
paste0("Kunden$Kunde_real_", year) <- (paste0("Kunden$Umsatz_", year) <= 0) *
1 +
I have been using Ubuntu and R Studio for about 5 years and have not had
any problems finding and installing packages. I believe there are
packages that only work in Windows but I don't what they are.
Michael Long
On 04/22/2016 11:51 AM, mylistt...@gmail.com wrote:
Dear Experts ,
I am using
Try upgrading R to version 3.2.5 and then try to reinstall swirl.
Michael Long
On 04/22/2016 03:41 AM, Tim Werwie wrote:
I'm very new to R and I live in Mali, west Africa. I'm on *OS X 10.7.5*. I
downloaded and installed *R 3.2.1*. I downloaded and installed *RStudio
00.99.893*.
I ran through
The direct answer to your question is to look at ?get and ? assign.
The R-ish answer to your question is to store the data as elements of a
list rather than separate files and use lapply() instead.
Sarah
On Friday, April 22, 2016, wrote:
> Hi all,
>
> I would like to use a loop for tasks that
Hi Georg,
The " around Kunden$* looks unintentional to me.
Second: haveyou considered using a long table? Then you would fill a known
set of columns.
Third if you must have columns based on year I believe df[[a.column.name]]
will work.
Best
Ulrik
schrieb am Sa., 23. Apr. 2016 07:33:
> Hi a
Hi Edward,
I'm not really sure that this is what you want as I can't figure out
what the "earn" factor is, but:
epdat[order(epdat$Var2,epdat$Freq,decreasing=TRUE),]
Jim
On Sat, Apr 23, 2016 at 4:08 AM, Patzelt, Edward wrote:
> Hi R-Help,
>
> data at bottom
>
> I've been struggling with a probl
39 matches
Mail list logo