> On 17 Dec 2015, at 01:05 , David Winsemius wrote:
>
>>
>> On Dec 16, 2015, at 3:44 PM, peter dalgaard wrote:
>>
>>
>>> On 17 Dec 2015, at 00:00 , David Winsemius wrote:
>>>
>>> When I attempt to open that with Chrome I
Also
A %*% t(B) / C
Which works because when a vector is converted to a matrix, it becomes a
1-column matrix. The documentation for t() points this out but there is a typo:
"When x is a vector, it is treated as a column, i.e., the result is a 1-row
matrix."
Should be a "1-column matrix"
>
On Thu, Dec 17, 2015 at 6:30 AM, bruno higa wrote:
> Hey, i cant stop the emails about the forum, i delete my account and i want
> it. Can you help me ? Att.
> [[alternative HTML version deleted]]
>
> __
>
You need the is.na() function:
> dataset <- data.frame(No = 1:4, Name = c("Smith", "Mayor", "Miller",
> "Baltic"), Turnover = c(1500, 200, NA, 750))
> dataset
No Name Turnover
1 1 Smith 1500
2 2 Mayor 200
3 3 Miller NA
4 4 Baltic 750
[1] TRUE TRUE FALSE TRUE
>
Dear All,
I am new to "R" and search for a solution to exclude cases if a certain
variable contains NA for a case.
Example
No Name Turnover
1 Smith 1500
2 Mayor 200
3 Miller
4 Batic 750
I would like to create a subset excluding case 3 Miller NA.
I tried to following:
new_dataset <-
use the 'is.na' function:
new_dataset <- subset(dataset, subset = !is.na(Turnover))
Jim Holtman
Data Munger Guru
What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.
On Thu, Dec 17, 2015 at 7:50 AM, wrote:
> Dear
Hi,
I have a dataset with approx 400K Rows and 900 columns with a single dependent
variable of 0/1 flag. The independent variables are both categorical and
numerical. I have looked as SO/Cross Validated Posts but couldn't get an answer
for this.
Since I cannot try all possible combinations of
On Thu, Dec 17, 2015 at 01:50:29PM +0100, g.maub...@weinwolf.de wrote:
> Dear All,
>
> I am new to "R" and search for a solution to exclude cases if a certain
> variable contains NA for a case.
> ...
> I would like to create a subset excluding case 3 Miller NA.
>
> I tried to following:
>
>
> On Dec 17, 2015, at 8:38 AM, David L Carlson wrote:
>
> Also
>
> A %*% t(B) / C
>
Which would be equivalent to:
> outer(A, B)/C
[,1] [,2] [,3]
[1,] 10863.03 -14390.53 -287691.41
[2,] -127580.06 -13576.77 83597.56
And perhaps even more
Hi,
Sorry for this direct approach but I am stuck with a stupid data that I would
like to reformat.
The datafile is location at: fileURL <-
http://www.metoffice.gov.uk/pub/data/weather/uk/climate/datasets/Rainfall/ranked/Scotland.txt
You can read the data by:
Hi Fahad,
Easier than what? You didn't tell us what you tried, nor why you were
unhappy with it. I'm only passingly familiar with tidyr, but I came up
with
library(tidyr)
library(dplyr)
read.table("scotland_rainfall.txt", skip = 7, header=TRUE, fill = TRUE) %>%
select(-WIN, -SPR, -SUM, -AUT,
Lasso is an obvious choice by it may also be interesting to look at the
variable importance from a random forest model
On 17 Dec 2015 17:28, "Manish MAHESHWARI" wrote:
> Hi,
>
> I have a dataset with approx 400K Rows and 900 columns with a single
> dependent variable of 0/1
> On Dec 17, 2015, at 7:58 PM, Saba Sehrish wrote:
>
> Hi
>
> Please find the attachment with (.txt) extension and I hope the command is
> visible now.
>
> library(lmtest)
Why is this library loaded? I see no calls to functions from that package.
>
Hi Bradley,
I think I can see one or two reasons why you are getting creamed.
First, pollutantmean is a function, and there is no method for taking the
mean of a function.
Second, nitrate is unlikely to be an extractable element of pollutantmean
given the above code (that's the error).
I
Hi Saikat,
I don't know whether this can be done with ggplot, but if you don't get
another answer, have a look at the second example for the "barp" function
in the plotrix package. This shows how to get a specified range on the
color legend using the "xrange" argument.
Jim
On Fri, Dec 18, 2015
Hello.
I have more than one phi-psi time series data files each having 5 time
points.
I am trying to create density plots (2d histograms) for each and then I
would like to compare them. But to be able to compare one plot with the
other I need to have similar colour densities (i.e colour
Hi R users,
I am struggling to create a table in R. I did in Excel but I have a lots of
data and thought it might be easy in R but I am new in R. How to get
"output table" for this example data?
This is an example.
#
raw.data<-structure(list(Time1 = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L,
HI,
I am very new to R (and programming in general) and am taking a class in
it now. I am getting creamed. I want the last part of the function
statement below to give me the mean of the data set of nitrates. When I do
it I get an error statement stating:
Error in pollutantmean$nitrate :
Hi Marna,
A bit hard to understand. If raw.data is a record of 11 individuals
released at site A at Time 1 and recaptured at either A or B or neither at
Time2 or Time3, it doesn't seem to bear any consistent relationship to the
numeric coding in table.format or the output at the bottom. Could you
How to capture the output from the "command" option of tktable and how
to send input to it?
As far as I understand, the most appropriate way to use the tktable is
through the flag usecommand and command.
It fires the string information and cell coordinates and wait for a new
string to set a
We would like to announce the following statistics course:
Course: Introduction to GAM and GAMM
Where: University of Konstanz, Konstanz, Germany
When: 7-11 March 2016
Course website: http://www.highstat.com/statscourse.htm
Course flyer: http://highstat.com/Courses/Flyer2016_03Konstanz.pdf
Ok. And what is the problem now?
B.
On Dec 17, 2015, at 4:25 PM, Sidoti, Salvatore A.
wrote:
> Greetings!
>
> I have a fairly large dataframe (df) with pathing information in the form of
> continuous x,y coordinates:
>
> df$x
> df$y
>
> With these data, I
Hi
Please find the attachment with (.txt) extension and I hope the command is
visible now.
library(lmtest)data<-read.csv(file="---",header=T,sep=",")A<-as.matrix(data$DODGX)B<-as.matrix(data$TRMCX)
nrow<-nrow(A)A1<-matrix(NA,nrow,1)A2<-matrix(NA,nrow,1)
A3<-matrix(NA,nrow,1)
A4<-matrix(NA,nrow,1)
Hi Hana,
If you are using nipals from the plsdepot package, the answer seems to be
maybe. If your categorical variables are at least ordinal level, and you
can arrange the values so that the factor numbering reflects this, it may
be possible to use the numeric values.
"...the variables are
Hi David,
that's a great answer, thanks so much. I imagined apply() was involved in
the solution, but I was unable to find how myself. Thanks again.
Matteo
On 17 December 2015 at 01:37, David Winsemius
wrote:
>
> > On Dec 16, 2015, at 5:34 PM, David Winsemius
Here's another approach, but it doesn't use tidy or dplyr:
> Rain.col <- seq(1, 24, by=2)
> Year.col <- seq(2, 24, by =2)
> Scotland.lst <- lapply(1:12, function(x) data.frame(Year =
+ scotland_weather[ , Year.col[x]], month = month.abb[x],
+ rainfall_mm = scotland_weather[ ,
> On Dec 17, 2015, at 1:13 PM, Saba Sehrish via R-help
> wrote:
>
> Hi I am trying to apply linear regression on the attached data
The is no attached data; please read the posting guide. Do not post with .csv
or .doc files. You can have commas as separators but an
Thank you, David! I adapted this code and it works very nicely with my data.
Just to give you a bit of background, I am a behavioral ecologist. I am
currently studying the general search patterns of wolf spiders and I have a lot
of tracking data to process. I am not a coder, although I am
Greetings!
I have a fairly large dataframe (df) with pathing information in the form of
continuous x,y coordinates:
df$x
df$y
With these data, I would like to:
1. Calculate a set of continuous vectors
2. Determine the angle between each of these vectors (in degrees)
3. Count the number of
Hi I am trying to apply linear regression on the attached data of two variables
(DODGX, TRMCX) in R by taking into account time lag=5 for both of them. Each
time I run this command, it gives me following error:
Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
Hi
I am trying to apply linear regression on the attached data of two variables
(DODGX, TRMCX) in R by taking time lag=5 for both of them. Each time I run this
command, it gives me following error:
Error in lm.fit(x,y,offset = offset, singular.ok = singular.ok, ...) :
NA/NaN/lnf in 'y'
In
Hola Gerard,
En Windows puedes hacer lo siguiente:
Suponiendo que "fichero.txt" es el archivo de texto con tus variables,
que se encuentra en el directorio de trabajo [compruébalo con dir()] y
que "nombres" es un vector que tienes en R con los nombres que quieres
poner a las variables de
Gerard,
dos preguntas:
1) Porqué quieres directamente especificar los encabezados en el fichero? Es
porqué tus ficheros no tienen las columnas igualmente ordenadas?
2) Qué sistema operativo tienes?
Un saludo. Olivier
- Mensaje original -
De: "Reverté Calvet, Gerard"
33 matches
Mail list logo