Statistical Packages

62

Solutions

159

Contributors

Statistical packages are software titles, such as JMP and GNU Octave, and programming languages, such as MATLAB, R and SAS, that are used to discover, explore and analyze data and suggest useful conclusions, either to learn something unexpected or to confirm a hypothesis. The field includes the design and analysis of techniques to give approximate but accurate solutions to hard problems in statistics, econometrics, time-series, optimization and 2D- and 3D-visualization. Data analysis has multiple facets and approaches, encompassing diverse techniques under a variety of names, in different business, science, and social science domains.

Share tech news, updates, or what's on your mind.

Sign up to Post

I recently procured Visual Studio 2017 professional and trying to hands on with R tools.
I created a new R project and created a custom (user defined) function.  The function generates
4 sub-graphs with the function par(mfrow=c(2,2)) in one main graph
My function is working well with regular R software version 3.4.
When I trying the same function in R tools in Visual Studio 2017, I am getting an error
Error in plot.new() : figure margins too large
What could be the problem. Any solutions for rectification?
0
Free Tool: Port Scanner
LVL 9
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

private void FileDataRequest(StreamedFileDataRequest r)

{

MemoryStream m = new MemoryStream();

r = m.AsOutputStream as StreamedFileDataRequest;
}
void loop(){
StorageLibrary l = await StorageLibrary.GetLibraryAsync(FromKnownId.Pictures);

Scrollviewer scrollviewer = new Scrollviewer();

RenderTargetBitmap r = null;

 r = new RenderTargetBitmap();

                await r.RenderAsync(scrollviewer);

                

                var file0 = await l.SaveFolder.CreateFileAsync("poikidiki");

                await FileIO.WriteBufferAsync(file0, await r.GetPixelsAsync());

                Windows.Storage.Streams.IRandomAccessStream b = await file0.OpenAsync(FileAccessMode.ReadWrite);

               

                var file = await StorageFile.CreateStreamedFileAsync("effort06.jpg", new StreamedFileDataRequestedHandler(FileDataRequest),Windows.Storage.Streams.RandomAccessStreamReference.CreateFromFile(file0));





   

              
                await file.CopyAsync(l.SaveFolder);

}

Open in new window

I have this:

it doesn't copy the bytes to the streamed file.

help appreciated
0
Hi ,

I am passing list value into the datatable.

I want to find the column first and then check whether the value exist or not for that columns.

I want to write in LINQ Query as bool true/false

for example,

string str ABSCHECK = ABS A#ABS B // input value

string[] words1 = str.Split('#'); //Splitting the values

words1[0] ABS A //list

           [1] ABS B

The above two value is a column name and i want to check in the below table.

 DTTABLE :

A      ABS A(MN)      ABS A(MX)      ABS B(MN)      ABS B(MX)      ABS C(MN)      ABS C(MX)
100      100      100      100      100      100      100
For ABS A ==> Matching two columns and values present(like ABS A(MN) and ABS A(MX))

For ABS B ==> Matching two columns and values exists (like ABS B(MN) and ABS B(MX))

So i want to return result is true.

if nothing is matching, it means (column not identified and value not present) returns false.

How to write LINQ..?

below is my query

string str ABSCHECK = ABS A#ABS B // input value

string[] words1 = str.Split('#'); //Splitting the values

bool results = (from r in DTTABLE.AsEnumerable()
                           select r.Field<string>(words1.ToList())); // to find out columns and value

but not working..?
0
namespace Drawing_Pad
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class MainPage : Page
    {
        bool StartDrawing = false;

        bool IsOverCanvas = false;

        List<Color> colors = new List<Color>();

        Color selectedcolor = Colors.Black;

        Color red = Color.FromArgb(100, 200, 30, 30);

        Color orange = Color.FromArgb(100, 200, 100, 100);

        Color yellow = Color.FromArgb(100, 0, 200, 200);

        Color white = Color.FromArgb(255, 255, 255, 255);

        Color blue = Color.FromArgb(100, 30, 30, 200);

        Color green = Color.FromArgb(155, 30, 200, 30);

        Color black = Color.FromArgb(0, 0, 0, 0);

        Rectangle rect = null;

        Ellipse el = null;

        Polygon pol = null;

        UIElement elem = null;

        Line pointerline = null;

        int position = 0;

        bool Filling = false;

        int id = 0;

        bool Pressed = false;

        public MainPage()
        {
            this.InitializeComponent();

           

            this.KeyDown += MainPage_KeyDown;

            this.PointerPressed += MainPage_PointerPressed;

            this.PointerEntered += MainPage_PointerEntered;

            this.PointerExited += MainPage_PointerExited;

            canvas.PointerEntered += Canvas_PointerEntered;

            canvas.PointerExited …
0
Help! I am using this prcomp function but in order to use it I must remove the label name. Is there a way where I can do this and keep the label names or remove the name and add them back so I can plot data with labels instead of numbers.

I am using R.

tables <- pcp[, 1]
data <- pcp[, -1]

pca <- prcomp(data)
summary(pca)

library("ggplot2")
plot.data <- data.frame(pca$x[, 1:2])
g <- ggplot(plot.data, aes(x = PC1, y = PC2)) + geom_point(colour = alpha("steelblue", 0.5), size = 3) + geom_text(label = 1:54, colour = "darkgrey", hjust = 1.5) + theme_bw()
print(g)

Open in new window



I am getting this. Would like to plot names not numbers
here is the output
0
I am building a 2-tier Microsoft PKI infrastructure.
I have 1 off-line root CA and 2 issuing CA r running Windows server 2012 R2.  I want to have 1 active issuing CA an and the 2nd CA as a standby in a disaster recovery site.
How should I configure the CDP and AIA LOCATION?  Do I need a shared location where both CA’s can access the CRL information or can  I make the CDP and AIA  location local to the  issuing CA and rely on  a backup/restore  if I need to activate the 2nd  CA in DR.

Thanks,
0
Hello All Experts,
I am a student enthusiast in learning "Data Analytics" , which is the best platform to learn for FREE?
I want to Learn 'Data Science (Statistics)' & 'SAS/R' from scratch?
Any videos? Any websites? Any Blogs?

Thanks,

Regards,
Satish Kumar G N
0
Hi All,
While using REF keyword in my logical file , i get compilation error - "Record name same as name of file being created"

DDS of LF -

*************** Beginning of data *************************************
                                            REF(ACCOUNT)                
                R USEREF                                                
                  ACCLVL    R               REFFLD(ACCLEVELID ACCOUNT)  
                  ACCORG    R               REFFLD(ACTORGCOD  ACCOUNT)  
                  ACCNUM    R               REFFLD(ACCOUNTNUM ACCOUNT)  
****************** End of data ****************************************

May i know why is that so ?
0
Issue is that when I set a different it doesn't update neither my texblock.Text nor my listbox.Items;

Help very appreciated:)

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Windows.Services.Maps;
using Windows.Devices.Geolocation;


// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409

namespace New_World_Map
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class MainPage : Page
    {
       

     

        List<string> stringlist = new List<string>();

        public MainPage()
        {
            this.InitializeComponent();

            this.RightTapped += MainPage_RightTapped;

            mapscontrol.CenterChanged += Mapscontrol_CenterChanged;

            listbox.DoubleTapped += Listbox_DoubleTapped;

            listview.Items.Add("Zoom In");

            listview.Items.Add("Zoom Out");

            listview.Items.Add("Navigate North");

            listview.Items.Add("Navigate South");

 …
0
gnn
bhhd
0
Free Tool: Path Explorer
LVL 9
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Team, need help resolving a laptop build that's continously failing at the bitlocker stage of task sequence, it's specific to just this model laptop, and I suspect it's related to some BIOS config.
Can you advise or direct me please,
Laptop Model = HP Elite X2 1012

______________________________________________________________________________________________________________________________________________
Error in logs:

... r
Initial TPM state: 55
Creating TPM owner authorization value
Succeeded loading resource DLL 'C:\Windows\CCM\1033\TSRES.DLL'
Taking ownership of TPM
uStatus == 0, HRESULT=80070005 (e:\nts_sccm_release\sms\framework\tscore\tpm.cpp,645)
pTpm->TakeOwnership( sOwnerAuth ), HRESULT=80070005 (e:\nts_sccm_release\sms\client\osdeployment\bitlocker\bitlocker.cpp,522)
InitializeTpm(), HRESULT=80070005 (e:\nts_sccm_release\sms\client\osdeployment\bitlocker\bitlocker.cpp,1313)
ConfigureKeyProtection( keyMode, pwdMode, pszStartupKeyVolume ), HRESULT=80070005 (e:\nts_sccm_release\sms\client\osdeployment\bitlocker\bitlocker.cpp,1552)
pBitLocker->Enable( argInfo.keyMode, argInfo.passwordMode, argInfo.sStartupKeyVolume, argInfo.bWait ), HRESULT=80070005 (e:\nts_sccm_release\sms\client\osdeployment\bitlocker\main.cpp,382)
'TakeOwnership' failed (2147942405)
Failed to take ownership of TPM. Ensure that Active Directory permissions are properly configured
ccess is denied. (Error: 80070005; Source: Windows)
0
write.csv(df,file="~C:/Users/anitha/Documents/social_media analysis/socialmedia/tweets.csv",row.names=FALSE,append = TRUE)
Error in file(file, ifelse(append, "a", "w")) :
  cannot open the connection
0
Its supposed to be a map guider an accurate gps for car by giving the accurate route through roads car must do.

underlined line is what debug shows it as wrong.

any other

using System;


using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Windows.Devices.Geolocation;
using Windows.Services.Maps;


// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409

namespace App75
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class MainPage : Page
    {
        public MainPage()
        {
            this.InitializeComponent();

            button.Tapped += Button_Tapped;
        }

        private async void Button_Tapped(object sender, TappedRoutedEventArgs e)
        {
            BasicGeoposition b1 = new BasicGeoposition();

            b1.Latitude = Convert.ToDouble(startpositionlatitude.Text);

            b1.Longitude = Convert.ToDouble(startpositionlongitude.Text);

            BasicGeoposition b2 = new BasicGeoposition();
0
Hi,

I fairly new in R, I am doing some simple visualization in shiny app, I am trying to flip a bar chart downward using  scale_y_reverse() , it works well when I run my code in R console, but when I run it in shiny it does not flip the bar chart, below is my code in the server part:

output$trendbarPlot <- renderPlotly({
                              mydat <- mydatCopy %>% filter(Country ==input$Country)
                              

attacksbarplot = ggplot(data=mydat,aes(x=as.factor(Year))) + geom_bar() + theme_bw(base_size=35) + xlab("") + ylab("") + theme(axis.text.x = element_blank(), axis.ticks=element_blank(),panel.grid.major=element_blank(),panel.grid.minor=element_blank(),panel.border=element_blank())  + scale_y_reverse()


attacksbarplotnol = ggplot(data=mydat,aes(x=as.factor(Year))) + geom_bar() + theme_bw(base_size=15) + xlab("") + ylab("") + theme(axis.text.x = element_blank(), axis.text.y = element_blank(), axis.ticks=element_blank(),panel.grid.major=element_blank(),panel.grid.minor=element_blank(),panel.border=element_blank()) +  scale_y_reverse()
 
                              })

attached file has the required flipped bar chart in shiny.

Does anyone knows how can I solve this issue?
FlippedChart.png
0
Hi,
 We have a common situation where we want to browse through a folder container 'n' number of files and execute a package created for each file so we can import each of the file into a corresponding table in our sql server db. The packages are all included in the project.

'For each' of these files in the folder, a script task identifies the package full path and sets it to a variable which I then try to set it to 'connection' on the expression of the package. Question is what should I be setting in expression, 'Connection' to full path of the pacakge or just 'PackageName' (to the package Name alone)?

When I try to set PacakgeName in the expression  - using project reference, the designer complains that "Failed to locate the specified package in the project".  We tried both "project reference and external reference" file system to no avail.

Should I be using Project Reference at all? Or Should I use external Reference and then file system which also doesn't seem to work? We are not deploying the packages to anywhere else right now.

Nothing seems to be changing the execution at run time. What is the right way to do this? What exactly should go in the expression to switch the packages dynamically?

Thank you.
0
My data:

Gage_number Latitude    Longitude   Date    Gage_1  Gage_2  Gage_3

1   35.02   -80.84  1/1/2002    0.23    0   0.7
2   35.03   -81.04  1/2/2002    0   0   0.2
3   35.06   -80.81  1/3/2002    3.2 2.1 0.1
This is just a subset of data. I around 50 gauge stations. I want to find spatial auto correction between my gauge stations for rain fall. Based on distance between them. I have created my distance matrix. But I don’t want to use any library in R. I want to do all steps in a function.

loc <- read.table("rain_data.txt",header=TRUE,fill=TRUE)  
gauge.dists <- as.matrix(dist(cbind(loc$Latitude, loc$Latitude))) #distance matrix
Now since distance between gauges is not uniform. I want to use a certain bin size to decide about distance lags.

Pseudocode:

If the distance between guage pair 1-2 is 1 meter then assign a distance lag of 1 and so on So Lag 1=intergage dist=1 meter. So Lag 5=intergage dist=5 meter After creating that matrix I will find autocorrelation between gauge pairs.

so for lag 1 intergage dist=1 for lag 5 intergage dist=5

Gage pair   date    RainA   RainB       Gage pair   date    RainA   RainB

1-2 1/1/2002    0.23    0       1-3 1/1/2002    0.23    0.7
1-2 1/2/2002    0   0       1-3 1/2/2002    0   0.2
1-2 1/3/2002    3.2 2.1     1-3 1/3/2002    3.2 0.1
I have a hard time translating it into loop or a function. Any ideas?
0
I am bit new to R so I am not sure if this is possible or if its more difficult than I am assuming.

Objective: I want to find the correlation between Diagnosis codes. If patient #1 has condition X what the likelihood he will at some point also have condition Y as well.

Here is what I have:
136,337 Unique patient IDs (74,527 Female, 61,810 Male)
34,442 Unique Diagnosis that exists in my population
7,777,728 Unique observations

So my 2 questions are:
1. How should I layout my Table for R?
Right now I have the table columns as :
ID, SEX, Diagnosis

2. What should my Rscript look like in order to create correlation coefficients between all my diagnosis codes.  

FYI: Yes I also have a time stamp per diagnosis code but adding it now would be to adding more confusion to the confusion I already have.
0
I have an excel file that I want to add a two new columns to and then group and sum the new and other columns in R Studio and save the output, not entirely sure how to do this.  

Adding two new columns:
if Sec_flag is "Y" then I want to add a new column called Sec_checked and put a 1 as the value
if stu_status is "Ret" i want to add another new column Stu_check and put a 1 as the value

Group & Sum
I would like to group the data by columns Year, Month, Stu_status, Point1, Point2 and Point3 and sum them by the values in stu_fee, stu_return_fee, student_count, Sec_checked and Stu_check.
Overtime I will add new data points to my excel file so I would like to be able to add these in future and get new groupings.

I tried using plyr but i dont know how to add the new columns and group & sum the data.
setwd("C:/Desktop/rtest")
system("java -version")

library(xlsx)
mydata <- read.xlsx("stu_d_sample.xlsx", sheetName = "Sample") 
mydata


library(plyr)
groupColumns = c("year","month", "Stu_status","Point1","Point2","Point3")
dataColumns = c("stu_fee", "stu_return_fee","student_count", "Sec_checked", "stu_check")
res = ddply(baseball, groupColumns, function(x) colSums(x[dataColumns]))
head(res)

Open in new window

stu_d_sample---Copy.xlsx
0
2 Questions about regression in R
 
  Question 1:
 
  Let's say I create a model that correlates the unique words found in a corpus to the number of lines read. Notice that this model compiles the logs of BOTH, the outcome and the predictor.
 
  x <- lm( log(Words) ~ log(Lines) )
 
  Does that mean that exp(predict(x,list(Lines=100000))) will give me the number of words for a given number of lines? Or will it give me the LOG of a number of words for a given number of lines?
 
  Question 2:
 
  How do I invert this model so that I can input a number of words, and get back a prediction for the number of lines required in order to obtain this quantity of words?
0
Hello all,
i have a situation where a common value out of available data is to be computed, but the data contains different summary stats, for example:
consider there are apples in different boxes and average size of the apple is to be determined, and the available data consists  of size mean  from one basket, standard deviation of size from other basket,min size and max size from other boxes, is there any way that a general value can be derived to represent size of the apple? 
0

Statistical Packages

62

Solutions

159

Contributors

Statistical packages are software titles, such as JMP and GNU Octave, and programming languages, such as MATLAB, R and SAS, that are used to discover, explore and analyze data and suggest useful conclusions, either to learn something unexpected or to confirm a hypothesis. The field includes the design and analysis of techniques to give approximate but accurate solutions to hard problems in statistics, econometrics, time-series, optimization and 2D- and 3D-visualization. Data analysis has multiple facets and approaches, encompassing diverse techniques under a variety of names, in different business, science, and social science domains.

Top Experts In
Statistical Packages
<
Monthly
>